I have the following code in my destroy method:
try{
Tecnico::find($id_tecnico)->delete();
DB::commit();
return Redirect::back()->with('message', true);
}catch (\Exception $e){
DB::rollback();
return $this->renderHttpException($e);
}
How do I also delete an image that is linked to the technician being deleted?
The images are in the public folder, and the path / name is in a "signature" field of the table.
I think I would have to take this path and use some method to delete the file, but I do not know how to do this "delete".