How could I delete a directory from the public folder? Right now I try this:
Storage::deleteDirectory($directory);
但它会在存储文件夹中找到吗?
How could I delete a directory from the public folder? Right now I try this:
Storage::deleteDirectory($directory);
但它会在存储文件夹中找到吗?
你可以用Illuminate\Filesystem\Filesystem
来做这个.Laravel提供了File
立面,便于进入:
File::deleteDirectory(public_path('path/to/folder'));
The method will return true
if it succeeds, false
if it fails.