我想删除存储在storage/app/myfolder/file.jpg中的文件。我曾尝试以下代码,但这些都不作品:Laravel 5.4:如何删除存储在存储/应用程序中的文件
use File
$file_path = url().'/storage/app/jobseekers_cvs/'.$filename;
unlink($file_path);
和
use File
$file_path = public_path().'/storage/app/myfolder/'.$filename;
unlink($file_path);
和
use File
$file_path = app_path().'/storage/app/myfolder/'.$filename;
unlink($file_path);
而且,
File::Delete('/storage/app/myfolder/'.$filename);
请帮助。
我该怎么设置路径。像存储/应用程序/我的文件夹/文件名 –
[这](https://laravel.com/docs/5.4/filesystem#retrieving-files)将帮助你 –