Drfub
0
Q:

add to collection laravel

$item = collect();
$item->push($product);
0
$collection = collect([1,2,3,4]);

$collection->each(function($item){
    return $item*$item;
});

// [1,4,9,16]
0

New to Communities?

Join the community