修改权限
This commit is contained in:
@@ -13,11 +13,12 @@ trait HasRolesTrait
|
||||
return $this->belongsToMany(Roles::class, 'user_has_roles', 'role_id', 'uid');
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @time 2019年12月08日
|
||||
* @return mixed
|
||||
*/
|
||||
/**
|
||||
*
|
||||
* @time 2019年12月08日
|
||||
* @param array $fields
|
||||
* @return mixed
|
||||
*/
|
||||
public function getRoles()
|
||||
{
|
||||
return $this->roles()->select();
|
||||
@@ -54,4 +55,4 @@ trait HasRolesTrait
|
||||
|
||||
return $this->roles()->detach($roles);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user