protected function getAllowedRoles()
    {
        if ($this->request->user('administrator')->isRole('super-administrator')) {
            $roles = $this->role->newQuery()->get();
        } else {
            $roles = $this->role->newQuery()->where('slug', '!=', 'super-administrator')->get();
        }

        return $roles->pluck('name', 'id');
    }
protected function getAllowedRoles()
    {
        if ($this->request->user('administrator')->isRole('super-administrator')) {
            $roles = $this->role->newQuery()->get();
        } else {
            $roles = $this->role->newQuery()->where('slug', '!=', 'super-administrator')->get();
        }

        return $roles->pluck('name', 'id');
    }
protected function getAllowedRoles ( ) { if ( $ this -> request -> user ( 'administrator' ) -> isRole ( 'super-administrator' ) ) { $ roles = $ this -> role -> newQuery ( ) -> get ( ) ; } else { $ roles = $ this -> role -> newQuery ( ) -> where ( 'slug' , '!=' , 'super-administrator' ) -> get ( ) ; } return $ roles -> pluck ( 'name' , 'id' ) ; }
Get allowed roles for the current user.

@return mixed
Get allowed roles for the current user .