修改权限

This commit is contained in:
wuyanwen
2019-12-27 09:52:03 +08:00
parent b94800033f
commit ef30c07f4a
5 changed files with 61 additions and 38 deletions

View File

@@ -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);
}
}
}