Answers for "create collection in laravel from array"

PHP
0

create collection in laravel from array

$collection = collect([
    (object) [
        'website' => 'twitter',
        'url' => 'twitter.com'
    ],
    (object) [
        'website' => 'google',
        'url' => 'google.com'
    ]
]);
Posted by: Guest on June-01-2021

Code answers related to "create collection in laravel from array"

Browse Popular Code Answers by Language