diff --git a/app/Models/Component.php b/app/Models/Component.php index 50fe616debae..aebb7efa0cca 100644 --- a/app/Models/Component.php +++ b/app/Models/Component.php @@ -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. * diff --git a/app/Models/Incident.php b/app/Models/Incident.php index 8b32f59e194e..dc15a14e90b2 100644 --- a/app/Models/Incident.php +++ b/app/Models/Incident.php @@ -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. * diff --git a/app/Models/Subscriber.php b/app/Models/Subscriber.php index 8f5651de50ad..bbd3030f30ca 100644 --- a/app/Models/Subscriber.php +++ b/app/Models/Subscriber.php @@ -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. *