added cast for enabled field
This commit is contained in:
parent
330aee0dde
commit
aa604b7056
@ -18,6 +18,10 @@ abstract class Model extends Eloquent
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
protected $casts = [
|
||||
'enabled' => 'boolean',
|
||||
];
|
||||
|
||||
/**
|
||||
* The "booting" method of the model.
|
||||
*
|
||||
|
@ -42,6 +42,15 @@ 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.
|
||||
*
|
||||
|
@ -21,6 +21,10 @@ class Company extends Eloquent
|
||||
|
||||
protected $fillable = ['domain', 'enabled'];
|
||||
|
||||
protected $casts = [
|
||||
'enabled' => 'boolean',
|
||||
];
|
||||
|
||||
/**
|
||||
* Sortable columns.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user