Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to delete image from floder in laravel

//suppose you have an image inside public/images folder 
$image_path = "/images/filename.ext";  // Value is not URL but directory file path
if(File::exists($image_path)) {
    File::delete($image_path);
}
//don't forget to add "use IlluminateSupportFacadesFile;"
 
PREVIOUS NEXT
Tagged: #delete #image #floder #laravel
ADD COMMENT
Topic
Name
1+8 =