Answers for "filter collection for cols eloquent"

PHP
1

filter collection (laravel)

$itemCollection = collect($contacts);
$filtered = $itemCollection->filter(function($item) use ($search) {
    return stripos($item['username'],$search) !== false;
});
Posted by: Guest on June-12-2021

Code answers related to "filter collection for cols eloquent"

Browse Popular Code Answers by Language