use Storage;
$postroute_ori=/images/120_5.JPG;
// Delete a single file
File::delete($postroute_ori); <---"/images/120_5.JPG" not work
$delfile='/public'.$postroute_ori;
dump($delfile);
Storage::delete($delfile); <---"/public/images/120_5.JPG" not work
$image_path = public_path().$postroute_ori;
dump($image_path);
unlink($image_path); <--"D:\AppServ\www\codo\public/images/120_5.JPG" work well
$image_path = public_path().$postroute_ori;
dump($image_path);
Storage::delete($image_path); <--"D:\AppServ\www\codo\public/images/120_5.JPG" not work
other method like
use file;
file::delete($filename) <----not work
只有php方法unlink工作得很好〜 如何正确使用laravel storege方法?