src/MediaRepository.php
protected function getDefaultFilterFunction(array $filters): Closure
    {
        return function (Media $media) use ($filters) {
            foreach ($filters as $property => $value) {
                if (! Arr::has($media->custom_properties, $property)) {
                    return false;
                }

                if (Arr::get($media->custom_properties, $property) !== $value) {
                    return false;
                }
            }

            return true;
        };
    }
protected function getDefaultFilterFunction(array $filters): Closure
    {
        return function (Media $media) use ($filters) {
            foreach ($filters as $property => $value) {
                if (! Arr::has($media->custom_properties, $property)) {
                    return false;
                }

                if (Arr::get($media->custom_properties, $property) !== $value) {
                    return false;
                }
            }

            return true;
        };
    }
protected function getDefaultFilterFunction ( array $ filters ) : Closure { return function ( Media $ media ) use ( $ filters ) { foreach ( $ filters as $ property => $ value ) { if ( ! Arr :: has ( $ media -> custom_properties , $ property ) ) { return false ; } if ( Arr :: get ( $ media -> custom_properties , $ property ) !== $ value ) { return false ; } } return true ; } ; }
Convert the given array to a filter function.

@param $filters

@return \Closure
Convert the given array to a filter function .