예제 #1
0
 protected function onPost(\Controllers\Request $input)
 {
     $id = $input->get('id');
     $this->data['update_success'] = false;
     try {
         $obj = Order::createFromInput($input, $id);
         $this->data['update_success'] = true;
     } catch (\App\Exceptions\Validation $ex) {
         $this->data['errors'] = $ex->validator->errors();
     } catch (\Exception $ex) {
         $this->errors->add('update-error', $ex->getMessage());
     }
     return parent::onPost($input);
 }
예제 #2
0
 protected function onPost(\Controllers\Request $input)
 {
     $id = $input->get('id');
     $this->data['update_success'] = false;
     try {
         Module::find($id)->delete();
         $this->data['delete_success'] = true;
         return $this->redirect($this->plugin->modules_url());
     } catch (\App\Exceptions\Validation $ex) {
         $this->data['errors'] = $ex->validator->errors();
     } catch (\Exception $ex) {
         $this->errors->add('delete-error', $ex->getMessage());
     }
     return parent::onPost($input);
 }
예제 #3
0
 protected function onPost(\Controllers\Request $input)
 {
     $this->data['create_success'] = false;
     try {
         $obj = Module::createFromInput($input);
         $this->data['create_success'] = true;
         $this->view = 'admin.modules.edit';
         $this->dta['module'] = $obj;
         return $this->redirect($this->plugin->modules_url('update', ['id' => $obj->id]));
     } catch (\App\Exceptions\Validation $ex) {
         $this->data['errors'] = $ex->validator->errors();
     } catch (\Exception $ex) {
         $this->errors->add('create-error', $ex->getMessage());
     }
     return parent::onPost($input);
 }
예제 #4
0
 protected function onPost(\Controllers\Request $input)
 {
     $id = $input->get('id');
     $this->data['update_success'] = false;
     try {
         Soil::find($id)->delete();
         $this->data['delete_success'] = true;
         $this->view = 'admin.soil.index';
         $this->data['soil_types'] = Soil::all();
     } catch (\Exceptions\Validation $ex) {
         $this->data['errors'] = $ex->validator->errors();
     } catch (\Exception $ex) {
         $this->errors->add('delete-error', $ex->getMessage());
     }
     return parent::onPost($input);
 }
예제 #5
0
파일: All.php 프로젝트: Aliqhuart/puzzle-wp
 protected function onPost(\Controllers\Request $input)
 {
     return parent::onPost($input);
 }
예제 #6
0
 protected function onPost(\Illuminate\Http\Request $input)
 {
     return parent::onPost($input);
 }