PamAccount
class PamAccount extends Model implements Authenticatable, JWTSubject, RbacUserContract mixin Eloquent
用户账号
Traits
Constants
TYPE_BACKEND |
|
TYPE_USER |
|
REG_TYPE_USERNAME |
|
REG_TYPE_MOBILE |
|
REG_TYPE_EMAIL |
|
GUARD_WEB |
|
GUARD_BACKEND |
|
GUARD_JWT_BACKEND |
|
GUARD_JWT_WEB |
|
GUARD_JWT |
|
REG_PLATFORM_IOS |
|
REG_PLATFORM_ANDROID |
|
REG_PLATFORM_WEB |
|
REG_PLATFORM_PC |
|
REG_PLATFORM_H5 |
|
REG_PLATFORM_WEAPP |
|
REG_PLATFORM_WEBAPP |
|
REG_PLATFORM_MGR |
|
BACKEND_MOBILE_PREFIX |
|
PWD_NUMBER |
|
PWD_CHAR |
|
PWD_CASE |
|
PWD_SPECIAL |
|
Properties
protected | $table | ||
protected | $dates | ||
protected | $fillable | ||
int | $id | ||
string | $mobile | 手机号 | |
string | $username | 用户名称 | |
string | $password | 用户密码 | |
string|null | $password_key | 账号注册时候随机生成的6位key | |
Carbon | $logined_at | 登录时间 | |
int | $login_times | 登录次数 | |
string | $reg_ip | 注册IP | |
string | $login_ip | 当前登录IP | |
int | $parent_id | 父ID | |
int | $is_enable | 是否启用 | |
string|null | $type | 类型 | |
string|null | $note | 用户备注 | |
string|null | 邮箱 | ||
string|null | $reg_platform | 注册平台 | |
string | $disable_reason | 禁用原因 | |
string|null | $disable_start_at | 禁用开始时间 | |
string|null | $disable_end_at | 禁用结束时间 | |
string | $remember_token | Token | |
Carbon | $created_at | ||
Carbon | $updated_at | ||
PamRoleAccount read-only | $role | ||
Collection|PamRole[] read-only | $roles |
Methods
Get the identifier that will be stored in the subject claim of the JWT.
Return a key value array, containing any custom claims to be added to the JWT.
通行证类型(可能返回不匹配的通行证类型)
补足 86 手机号
根据passport返回Pam
验证通行证是否存在, 自动补足 86
获取定义的 kv 值
获取定义的 kv 值
注册平台
获取账户实例
默认手机号(国际版默认)
后台手机通行证
No description
密码策略
Details
in
RbacUserTrait at line 24
Collection
cachedRoles()
No description
in
RbacUserTrait at line 35
static
boot()
No description
in
RbacUserTrait at line 67
BelongsToMany
roles()
Many-to-Many relations with Role.
in
RbacUserTrait at line 83
bool
hasRole($name, bool $require_all = false)
No description
in
RbacUserTrait at line 116
bool
capable($permission, bool $require_all = false)
No description
in
RbacUserTrait at line 150
ability($roles, $permissions, array $options = [])
No description
in
RbacUserTrait at line 217
attachRole($id)
No description
in
RbacUserTrait at line 226
detachRole($id)
No description
in
RbacUserTrait at line 233
static protected
clearCachedRoles()
No description
at line 122
mixed
getJWTIdentifier()
Get the identifier that will be stored in the subject claim of the JWT.
at line 131
array
getJWTCustomClaims()
Return a key value array, containing any custom claims to be added to the JWT.
at line 147
static string
passportType(string $passport)
通行证类型(可能返回不匹配的通行证类型)
at line 166
static string
fullFilledPassport($passport)
补足 86 手机号
at line 183
static Model|null|object|PamAccount
passport(string|numeric-string|int|float $passport)
根据passport返回Pam
at line 196
static bool
passportExists($passport)
验证通行证是否存在, 自动补足 86
at line 209
static Collection
permissions(PamAccount $pam)
获取用户所有的 permission
at line 225
static array|string
kvType(null|string $key = null, bool $check_key = false)
获取定义的 kv 值
at line 241
static array|string
kvRegType(null|string|int $key = null, bool $check_key = false)
获取定义的 kv 值
at line 258
static array|string
kvPlatform(null $key = null, bool $check_exists = false)
注册平台
at line 278
static PamAccount
instance()
获取账户实例
at line 293
static string
dftMobile($id)
默认手机号(国际版默认)
at line 304
static string
beMobile($mobile)
后台手机通行证
at line 315
static array|string
kvPwdStrength(string $key = null, bool $check_exists = false)
No description
at line 331
static array
pwdStrength(string $password)
密码策略