public function delete() { $input = Input::all(); try { $this->f->delete($input); } catch (PalmabitExceptionsInterface $e) { $errors = $this->f->getErrors(); return Redirect::action("Palmabit\\Catalog\\Controllers\\CategoryController@lists")->withErrors($errors); } return Redirect::action("Palmabit\\Catalog\\Controllers\\CategoryController@lists")->with(array("message" => "Categoria eliminata con successo.")); }
public function postChangeOrder() { $input = Input::all(); $validator = new ProductFormOrderValidator(); $form_model = new FormModel($validator, $this->r); try { $obj = $form_model->process($input); } catch (PalmabitExceptionsInterface $e) { $errors = $form_model->getErrors(); return Redirect::action("Palmabit\\Catalog\\Controllers\\ProductsController@lists")->withInput()->withErrors($errors); } return Redirect::action("Palmabit\\Catalog\\Controllers\\ProductsController@lists")->with(array("message" => "Ordine modificato con successo.")); }