I'm working on file delete function. I want to delete image from both database and folder. Image is deleting from database but not from the folder. But i want to perform delete image both from database and folder.
Here is my code.
public function dodelete() {
{
$contact = Contact::find(Input::get('id'));
File::delete("../app/uploads/");
if(!is_null($contact))
{
$contact->delete($file);
}
return Redirect::route('contact');
}
}