Answers for "how match array in laravel collection"

PHP
1

how match array in laravel collection

$collection = collect([
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9],
]);

$collapsed = $collection->collapse();

$collapsed->all();

// [1, 2, 3, 4, 5, 6, 7, 8, 9]
Posted by: Guest on October-18-2021

Code answers related to "how match array in laravel collection"

Browse Popular Code Answers by Language