samedi 21 juillet 2018

How can get files from inner folder of storage in laravel 5.5?

I need to list files from storage->app->public->huetten->it contains 17 folders. Each folder contains images. Any help would be appreciated.

public function show($id)
    {
        if(!empty($id)) {
            $directories = Storage::disk('public')->allDirectories('huetten');
            foreach ($directories as $directory) {
                //dd($directory); // Here i get huetten/folder1

                $files = Storage::files($directory);
                foreach ($files as $file) {
                    dd($file); // But here files are not listing
                }


            }
        }
    }



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire