Laravel 5 The tap method will allow you supply a callback that will receive a copy of the current collection instance. The user supplied function will not modify the original collection, but will return a...
Laravel 5 The pipe method is similar to the tap method in that it executes the provided $callback function on a copy of the collection; however, unlike the tap method, the pipe method returns the result of the callback...
Laravel 5 The each method accepts a $callback which will be called on each item in the collection. If the $callback returns false, the each method will break from its iterator and return a reference back to the original...
Laravel 5 The mapSpread method is used to execute a callback on a collection. If the collection contains nested collections, or Traversable objects, the mapSpread will supply the elements of the nested collections as the...
Laravel 5 The eachSpread method is used to execute the provided $callback function on each element in the collection. The element's values will become arguments to the callback function. Signature public function...