예제 #1
0
 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."));
 }
예제 #2
0
 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."));
 }