src/MediaRepository.php
protected function applyFilterToMediaCollection(Collection $media, $filter): Collection
    {
        if (is_array($filter)) {
            $filter = $this->getDefaultFilterFunction($filter);
        }

        return $media->filter($filter);
    }
protected function applyFilterToMediaCollection(Collection $media, $filter): Collection
    {
        if (is_array($filter)) {
            $filter = $this->getDefaultFilterFunction($filter);
        }

        return $media->filter($filter);
    }
protected function applyFilterToMediaCollection ( Collection $ media , $ filter ) : Collection { if ( is_array ( $ filter ) ) { $ filter = $ this -> getDefaultFilterFunction ( $ filter ) ; } return $ media -> filter ( $ filter ) ; }
Apply given filters on media.

@param \Illuminate\Support\Collection $media
@param array|callable $filter

@return \Illuminate\Support\Collection
Apply given filters on media .