I want to delete a News from database and when I hit the delete button all data from database deleted but the image is remains in upload folder. So, how do I this to work. t
Using PHP unlink() function, will have the file deleted
unlink()
$path = public_path()."/uploads/".$from_db->image_name; unlink($path);
The above will delete an image returned by $from_db->image_name located at public/uploads folder
$from_db->image_name
public/uploads