mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 06:13:45 +02:00
Fix casts on models; closes #49
This commit is contained in:
@@ -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 New Issue
Block a user