Template
更新
This commit is contained in:
1 parent
e265bcc28d
commit
b0ae1bb68c
8 files changed
+1387
-574
No files matched your search
@@ -88,6 +88,14 @@ class User extends Authenticatable implements JWTSubject
|
||||
return $this->roles()->where('code', $roleCode)->exists();
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断用户是否为超级管理员
|
||||
*/
|
||||
public function isSuperAdmin(): bool
|
||||
{
|
||||
return $this->hasRole('super_admin');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取 JWT 标识符
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user