Laravel 5 Collections: Conditionally Removing Elements From a Collection With reject
The reject method used to create a new Collection instance containing all the items in the collection that do not pass a given truth test. The reject method only defines one parameter: $callback . The $callback function should only have one...