Fix casts on models; closes #49
This commit is contained in:
parent
fa6a535349
commit
d6bd7e7a2e
10 changed files with 116 additions and 0 deletions
|
@ -57,6 +57,16 @@ class User extends Model implements AuthenticatableContract,
|
|||
*/
|
||||
protected $guarded = ['id', 'remeber_token', 'created_at', 'updated_at'];
|
||||
|
||||
/**
|
||||
* Cast values to correct type.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'root_admin' => 'integer',
|
||||
'use_totp' => 'integer',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
|
|
Reference in a new issue