コード例 #1
0
 public function editPermission()
 {
     // prepare input
     $input = Input::all();
     $operation = Input::get('operation');
     $this->form_model->prepareSentryPermissionInput($input, $operation);
     $id = Input::get('id');
     try {
         $obj = $this->group_repository->update($id, $input);
     } catch (JacopoExceptionsInterface $e) {
         return Redirect::route("users.groups.edit")->withInput()->withErrors(new MessageBag(["permissions" => Config::get('laravel-authentication-acl::messages.flash.error.group_permission_not_found')]));
     }
     return Redirect::action('Jacopo\\Authentication\\Controllers\\GroupController@editGroup', ["id" => $obj->id])->withMessage(Config::get('laravel-authentication-acl::messages.flash.success.group_permission_edit_success'));
 }
コード例 #2
0
 public function editPermission()
 {
     // prepare input
     $input = Input::all();
     $operation = Input::get('operation');
     $this->form_model->prepareSentryPermissionInput($input, $operation);
     $id = Input::get('id');
     try {
         $obj = $this->group_repository->update($id, $input);
     } catch (JacopoExceptionsInterface $e) {
         return Redirect::route("users.groups.edit")->withInput()->withErrors(new MessageBag(["permissions" => "Permesso non trovato"]));
     }
     return Redirect::action('Jacopo\\Authentication\\Controllers\\GroupController@editGroup', ["id" => $obj->id])->withMessage("Permesso modificato con successo.");
 }