added attribute casting

This commit is contained in:
Denis Duliçi
2020-11-13 15:15:27 +03:00
parent 9deac6b1f3
commit 2d7c18bae5
13 changed files with 108 additions and 99 deletions

View File

@ -29,6 +29,15 @@ class User extends Authenticatable
*/
protected $fillable = ['name', 'email', 'password', 'locale', 'enabled', 'landing_page'];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'enabled' => 'boolean',
];
/**
* The attributes that should be hidden for arrays.
*
@ -43,15 +52,6 @@ class User extends Authenticatable
*/
protected $dates = ['last_logged_in_at', 'created_at', 'updated_at', 'deleted_at'];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'enabled' => 'boolean',
];
/**
* Sortable columns.
*