Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel collection toArray

$collection = collect(['name' => 'Desk', 'price' => 200]);

$collection->toArray();

/*
    [
        ['name' => 'Desk', 'price' => 200],
    ]
*/
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #collection #toArray
ADD COMMENT
Topic
Name
2+6 =