add array to collection laravel code example
Example 1: how to add values to an array in laravel
$array = array('foo' => 'bar');
$array = array_add($array, 'key', 'value');
Example 2: add to collection laravel
$item = collect();
$item->push($product);