laravel generate a collection base on a number code example
Example 1: add to collection laravel
$item = collect();
$item->push($product);
Example 2: laravel pluck
$users = Users::pluck('name','email');
dd($users);
$item = collect();
$item->push($product);
$users = Users::pluck('name','email');
dd($users);