collect php laravel code example Example: collection methods laravel $collection->each(function ($item, $key) { hj });