Properties

$timestamps

$timestamps : boolean

是否主动维护时间戳

Type

boolean

$instance

$instance : 

单例

Type

$primaryKey

$primaryKey : 

Type

$is_delete

$is_delete : 

Type

$delete_field

$delete_field : 

Type

$hidden

$hidden : 

Type

$guarded

$guarded : array

不可批量赋值的属性

Type

array

Methods

getInstance()

getInstance(  $args) 

Parameters

$args

setCopyTable()

setCopyTable(string  $new_table, string  $old_table) : boolean

复制表

Parameters

string $new_table
string $old_table

Returns

boolean

detail()

detail(\App\Traits\int  $id, \App\Traits\string  $filed = '*', \App\Traits\bool  $lock = false, array  $with = array(), array  $withCount = array()) 

Parameters

\App\Traits\int $id
\App\Traits\string $filed
\App\Traits\bool $lock
array $with
array $withCount

setFilterFields()

setFilterFields(array  $params) : array

过滤移除非当前表的字段参数

Parameters

array $params

Returns

array

getIsDelete()

getIsDelete() 

getDeleteField()

getDeleteField() 

getAdminByName()

getAdminByName(\App\Modules\Admin\Entities\Rabc\string  $admin_name) 

Parameters

\App\Modules\Admin\Entities\Rabc\string $admin_name

setPasswordAttribute()

setPasswordAttribute(  $key) 

Parameters

$key

getJWTIdentifier()

getJWTIdentifier() : mixed

获取会储存到 jwt 声明中的标识

Returns

mixed

getJWTCustomClaims()

getJWTCustomClaims() : array

返回包含要添加到 jwt 声明中的自定义键值对数组

Returns

array

adminInfo()

adminInfo() 

roles()

roles() 

assignRole()

assignRole(  $roles) : boolean

Parameters

$roles

Returns

boolean

deleteRole()

deleteRole(  $roles) : mixed

Parameters

$roles

Returns

mixed

getAdminHeadAttribute()

getAdminHeadAttribute(  $key) 

Parameters

$key

setAdminHeadAttribute()

setAdminHeadAttribute(  $key) 

Parameters

$key

booted()

booted() : void

模型的 "booted" 方法

应用全局作用域