Fix casts on models; closes #49
This commit is contained in:
parent
fa6a535349
commit
d6bd7e7a2e
10 changed files with 116 additions and 0 deletions
|
@ -42,4 +42,14 @@ class ServerVariables extends Model
|
|||
*/
|
||||
protected $guarded = ['id', 'created_at', 'updated_at'];
|
||||
|
||||
/**
|
||||
* Cast values to correct type.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'server_id' => 'integer',
|
||||
'variable_id' => 'integer',
|
||||
];
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue