public function destroy($id) { try { Midia::excluir($id, $this->tipo_midia); Foto::destroy($id); session()->flash('flash_message', 'Registro apagado com sucesso'); } catch (\Exception $e) { LogR::exception('destroy fotos', $e); session()->flash('flash_message', 'Ops!! Ocorreu algum problema!. ' . $e->getMessage()); } return Redirect::back(); }
public function getDelFoto($id){ Foto::destroy($id); return redirect('home')->with('message','Фото удалено'); }