Deleting an image on the form

0

I need to delete one image at a time from my database, I have a n:m table and I can not delete the image.

Here's part of the method to delete the image.

public function deleteImg(Imagem $imagem)
{
    $imagem()->delete();
    \Session::flash('mensagem_sucesso_produtos','Imagem deletada!');
    return back();
}
    
asked by anonymous 30.11.2017 / 00:18

0 answers