Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel collection search by value

$itemCollection = collect($contacts);
$filtered = $itemCollection->filter(function($item) use ($search) {
    return stripos($item['username'],$search) !== false;
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #collection #search
ADD COMMENT
Topic
Name
3+4 =