Exemplo n.º 1
0
 public function update(User $user)
 {
     if ($user->id != 1) {
         $roles = Role::all();
         $permissions = PermissionModel::all();
         $rolesArray = unserialize($user->roles);
         if (!is_array($rolesArray)) {
             $rolesArray = [];
         }
         $permissionsArray = unserialize($user->permissions);
         if (!is_array($permissionsArray)) {
             $permissionsArray = [];
         }
         return $this->theme->baseDashboard('UserManagement::user.create')->with("User", $user)->with('roles', $roles)->with('permissions', $permissions)->with("rolesArray", $rolesArray)->with("permissionsArray", $permissionsArray);
     }
 }
Exemplo n.º 2
0
 public function index(Role $roll)
 {
     $roles = $roll->all();
     return $this->theme->baseDashboard("UserManagement::role.index")->with("roles", $roles);
 }