Skip to content

Commit

Permalink
Merge pull request #969 from cachethq/dates
Browse files Browse the repository at this point in the history
Moved dates to casts
  • Loading branch information
jbrooksuk committed Oct 1, 2015
2 parents 65023ec + db6faa7 commit 66bd80d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 23 deletions.
8 changes: 1 addition & 7 deletions app/Models/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
13 changes: 4 additions & 9 deletions app/Models/Incident.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
8 changes: 1 addition & 7 deletions app/Models/Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down

0 comments on commit 66bd80d

Please sign in to comment.