+ Cast date when fetch notifications

This commit is contained in:
Djery-Tom 2020-11-18 12:34:23 +01:00
parent 23c912fa51
commit 88382a73e3
1 changed files with 3 additions and 2 deletions

View File

@ -11,7 +11,7 @@ use Illuminate\Database\Eloquent\Model;
/**
* Class Notification
*
*
* @property int $id
* @property string $user_code
* @property string $agent_code
@ -28,7 +28,8 @@ class Notification extends Model
public $timestamps = false;
protected $casts = [
'read' => 'int'
'read' => 'int',
'date' => 'datetime:Y-m-d H:i:s'
];
protected $dates = [