how to delete images file from public/images folder in laravel 5 ??
i found some example from this site, but i know they are just using the file name in their record table
, but i'm using something like URL
e.g localhost/project/uploads/filename.jpg
on my record table
. so if i tried like this :
$image_path = $data->image; // the value is : localhost/project/image/filename.format
if(File::exists($image_path)) {
File::delete($image_path);
}
the file is not deleted
help pls, thanks
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2sWMCCX
via IFTTT
Aucun commentaire:
Enregistrer un commentaire