Skip to content

Commit 66bd80d

Browse files
committed
Merge pull request #969 from cachethq/dates
Moved dates to casts
2 parents 65023ec + db6faa7 commit 66bd80d

File tree

3 files changed

+6
-23
lines changed

3 files changed

+6
-23
lines changed

app/Models/Component.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,9 @@ class Component extends Model implements HasPresenter
4545
'group_id' => 'int',
4646
'description' => 'string',
4747
'link' => 'string',
48+
'deleted_at' => 'date',
4849
];
4950

50-
/**
51-
* The attributes that should be mutated to dates.
52-
*
53-
* @var array
54-
*/
55-
protected $dates = ['deleted_at'];
56-
5751
/**
5852
* The fillable properties.
5953
*

app/Models/Incident.php

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,12 @@ class Incident extends Model implements HasPresenter
3535
* @var string[]
3636
*/
3737
protected $casts = [
38-
'id' => 'int',
39-
'visible' => 'integer',
38+
'id' => 'int',
39+
'visible' => 'int',
40+
'scheduled_at' => 'date',
41+
'deleted_at' => 'date',
4042
];
4143

42-
/**
43-
* The attributes that should be mutated to dates.
44-
*
45-
* @var string[]
46-
*/
47-
protected $dates = ['scheduled_at', 'deleted_at'];
48-
4944
/**
5045
* The fillable properties.
5146
*

app/Models/Subscriber.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,9 @@ class Subscriber extends Model implements HasPresenter
2929
'id' => 'int',
3030
'email' => 'string',
3131
'verify_code' => 'string',
32+
'verified_at' => 'date',
3233
];
3334

34-
/**
35-
* The attributes that should be mutated to dates.
36-
*
37-
* @var array
38-
*/
39-
protected $dates = ['verified_at'];
40-
4135
/**
4236
* The fillable properties.
4337
*

0 commit comments

Comments
 (0)