public static function load($directoryName = 'filters'): array
    {
        $files = static::getFilePattern($directoryName);

        return collect(glob($files))
            ->map(function ($filename) {
                return include $filename;
            })
            ->flatten(1)
            ->toArray();
    }
public static function load($directoryName = 'filters'): array
    {
        $files = static::getFilePattern($directoryName);

        return collect(glob($files))
            ->map(function ($filename) {
                return include $filename;
            })
            ->flatten(1)
            ->toArray();
    }
public static function load ( $ directoryName = 'filters' ) : array { $ files = static :: getFilePattern ( $ directoryName ) ; return collect ( glob ( $ files ) ) -> map ( function ( $ filename ) { return include $ filename ; } ) -> flatten ( 1 ) -> toArray ( ) ; }
Load partials from a directory.

@param string $directoryName The name of the directory containing the partials.

@return array The loaded filters.
Load partials from a directory .