Answers for "Filtering Eloquent collection data with filter"

PHP
0

Filtering Eloquent collection data with filter

$filtered_collection = $collection->filter(function ($item) {
    return $item->isDog();
})->values();
Posted by: Guest on October-07-2021

Code answers related to "Filtering Eloquent collection data with filter"

Browse Popular Code Answers by Language