koleksi filter (Laravel)

$itemCollection = collect($contacts);
$filtered = $itemCollection->filter(function($item) use ($search) {
    return stripos($item['username'],$search) !== false;
});