コード例 #1
0
 public function deleteAction()
 {
     $form = new ProveedorForm();
     if ($form->isValidForDelete()) {
         $object = Proveedor::findOrFail(Input::get($this->key));
         $object->delete();
     }
     return Redirect::route($this->routeIndex);
 }
コード例 #2
0
 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
     }
 }