laravel collection set key value code example Example: add to collection laravel $item = collect(); $item->push($product);