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
First make sure the file exist by building the path
if($request->hasFile('image')){ $path = storage_path().'/app/public/YOUR_FOLDER/'.$db->image; if(File::exists($path)){ unlink($path); }