Laravel Collection Public API: reject
The reject method creates a new Collection by excluding items that do not pass a specified truth test. It takes a single parameter, $callback, which is a function that determines whether an item should be removed. If the $callback returns true, the item is excluded. For example, you can use reject to filter out names that do not start with...