/** * * @param type $id */ public function destroy($id) { $produto = $this->service->show($id); if ($produto['error']) { return redirect($this->url)->with("danger", $produto['messege']); } $this->service->delete($id); return redirect($this->url)->with("success", "Produto excluido!"); }
/** * * @param type $id */ public function destroy($id) { $cliente = $this->service->show($id); if ($cliente['error']) { return redirect($this->url)->with("danger", $cliente['messege']); } $this->service->delete($id); return redirect($this->url)->with("success", "Cliente excluido!"); }
/** * * @param type $id */ public function destroy($id) { $fornecedor = $this->service->show($id); if ($fornecedor['error']) { return redirect($this->url)->with("danger", $fornecedor['messege']); } $this->service->delete($id); return redirect($this->url)->with("success", "Fornecedor excluido!"); }
/** * * @param type $id * @return type */ public function edit($id) { $fornecedor = $this->service->show($id); return view('painel::paginas.editar-detalhes', compact('fornecedor')); }