Moved dates to casts

This commit is contained in:
Graham Campbell
2015-10-01 21:05:14 +01:00
parent 65023ec7da
commit db6faa70d3
3 changed files with 6 additions and 23 deletions

View File

@@ -45,15 +45,9 @@ class Component extends Model implements HasPresenter
'group_id' => 'int',
'description' => 'string',
'link' => 'string',
'deleted_at' => 'date',
];
/**
* The attributes that should be mutated to dates.
*
* @var array
*/
protected $dates = ['deleted_at'];
/**
* The fillable properties.
*

View File

@@ -35,17 +35,12 @@ class Incident extends Model implements HasPresenter
* @var string[]
*/
protected $casts = [
'id' => 'int',
'visible' => 'integer',
'id' => 'int',
'visible' => 'int',
'scheduled_at' => 'date',
'deleted_at' => 'date',
];
/**
* The attributes that should be mutated to dates.
*
* @var string[]
*/
protected $dates = ['scheduled_at', 'deleted_at'];
/**
* The fillable properties.
*

View File

@@ -29,15 +29,9 @@ class Subscriber extends Model implements HasPresenter
'id' => 'int',
'email' => 'string',
'verify_code' => 'string',
'verified_at' => 'date',
];
/**
* The attributes that should be mutated to dates.
*
* @var array
*/
protected $dates = ['verified_at'];
/**
* The fillable properties.
*