public function resources(String $type = null)
    {
        return [
            'resources' => collect(Storage::files($this->uploadFolder))
                ->filter(function ($file) {
                    return !str_is("{$this->uploadFolder}.*", $file);
                })
                ->map(function ($file) {
                    $fileParts = pathinfo($file);

                    return [
                        'public_id' => array_get($fileParts, 'filename'),
                        'format' => array_get($fileParts, 'extension'),
                    ];
                })->all()
            ];
    }
public function resources(String $type = null)
    {
        return [
            'resources' => collect(Storage::files($this->uploadFolder))
                ->filter(function ($file) {
                    return !str_is("{$this->uploadFolder}.*", $file);
                })
                ->map(function ($file) {
                    $fileParts = pathinfo($file);

                    return [
                        'public_id' => array_get($fileParts, 'filename'),
                        'format' => array_get($fileParts, 'extension'),
                    ];
                })->all()
            ];
    }
public function resources ( String $ type = null ) { return [ 'resources' => collect ( Storage :: files ( $ this -> uploadFolder ) ) -> filter ( function ( $ file ) { return ! str_is ( "{$this->uploadFolder}.*" , $ file ) ; } ) -> map ( function ( $ file ) { $ fileParts = pathinfo ( $ file ) ; return [ 'public_id' => array_get ( $ fileParts , 'filename' ) , 'format' => array_get ( $ fileParts , 'extension' ) , ] ; } ) -> all ( ) ] ; }
Return a list of local media resources. Currently the type parameter is not supported
in the default local media driver.

@param String $type
@return array
Return a list of local media resources . Currently the type parameter is not supported in the default local media driver .