public function deleteAction() { $form = new ProveedorForm(); if ($form->isValidForDelete()) { $object = Proveedor::findOrFail(Input::get($this->key)); $object->delete(); } return Redirect::route($this->routeIndex); }
public function deleteAction() { try { $form = new ProveedorForm(); if ($form->isValidForDelete()) { $object = Proveedor::findOrFail(Input::get($this->key)); $object->delete(); } return Redirect::route($this->routeIndex); } catch (\Illuminate\Database\QueryException $e) { //001 Codigo para mostrar error } }