Skip to content

Commit 368cc3b

Browse files
authored
update date casting (#394)
1 parent 82e7b20 commit 368cc3b

File tree

3 files changed

+2
-16
lines changed

3 files changed

+2
-16
lines changed

src/Models/Message.php

-7
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,6 @@ class Message extends Eloquent
3636
*/
3737
protected $fillable = ['thread_id', 'user_id', 'body'];
3838

39-
/**
40-
* The attributes that should be mutated to date's.
41-
*
42-
* @var array
43-
*/
44-
protected $dates = ['deleted_at'];
45-
4639
/**
4740
* {@inheritDoc}
4841
*/

src/Models/Participant.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ class Participant extends Eloquent
2525
protected $fillable = ['thread_id', 'user_id', 'last_read'];
2626

2727
/**
28-
* The attributes that should be mutated to date's.
28+
* The attributes that should be cast.
2929
*
3030
* @var array
3131
*/
32-
protected $dates = ['deleted_at', 'last_read'];
32+
protected $casts = ['last_read' => 'datetime'];
3333

3434
/**
3535
* {@inheritDoc}

src/Models/Thread.php

-7
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,6 @@ class Thread extends Eloquent
3535
*/
3636
protected $fillable = ['subject'];
3737

38-
/**
39-
* The attributes that should be mutated to date's.
40-
*
41-
* @var array
42-
*/
43-
protected $dates = ['deleted_at'];
44-
4538
/**
4639
* Internal cache for creator.
4740
*

0 commit comments

Comments
 (0)