Laravel 5 Collections: Filtering Collections With (Without Losing Filtered Rejections) partition
The partition method is similar to the filter method, in that it allows you to get a subset of a collection based on some truth condition. However, unlike the filter method, the partition method does not discard the elements that failed the truth...