1
I have in my method the following code:
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 that is 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 then I don’t know how to do this "delete".
show, thank you!
– Raylan Soares