Esempio n. 1
0
 /**
  * For sub-classes to add extra fields or remove fields
  *
  * @return array
  */
 protected function innerFields()
 {
     $fields = ['role_id' => ['type' => 'select', 'label' => 'role', 'options' => Role::dropdown()]];
     if ($this->isEditing()) {
         $fields += $this->passwordFields();
     }
     return $fields;
 }
Esempio n. 2
0
 /**
  * Drop down of all roles
  *
  * @return array
  */
 public static function dropdown()
 {
     return Role::lists('name', 'id');
 }
Esempio n. 3
0
 /**
  * Users index page (List current users)
  *
  * @param Role $role
  *
  * @return \Illuminate\View\View
  */
 public function getIndex(Role $role)
 {
     return view('administration.users.index', ['projects' => $this->auth->user()->projects()->get(), 'roles' => $role->rolesWithUsers()]);
 }