答案 0 :(得分:0)
使用存储外观
$directory = 'name of a directory';
// relative to root config set in config/filesystems.php which
by default is "storage_path('app/public')" so the search
will be in this directory
$directories = Storage::directories($directory);
// Recursive...
$directories = Storage::allDirectories($directory);
然后你将列表作为数组传递给它 查看
return view('view path',compact('directories'));