Fix casts on models; closes #49

This commit is contained in:
Dane Everitt 2016-01-26 22:17:51 -05:00
parent fa6a535349
commit d6bd7e7a2e
10 changed files with 116 additions and 0 deletions

View file

@ -43,6 +43,20 @@ class Node extends Model
*/
protected $hidden = ['daemonSecret'];
/**
* Cast values to correct type.
*
* @var array
*/
protected $casts = [
'public' => 'integer',
'location' => 'integer',
'memory' => 'integer',
'disk' => 'integer',
'daemonListen' => 'integer',
'daemonSFTP' => 'integer',
];
/**
* Fields that are not mass assignable.
*