Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The $dates array for mutating attributes is removed in Laravel 10; use $casts instead. #159

Merged
merged 1 commit into from
Apr 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions src/App/Models/Activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,6 @@ class Activity extends Model
'id',
];

/**
* The attributes that should be mutated to dates.
*
* @var array
*/
protected $dates = [
'created_at',
'updated_at',
'deleted_at',
];

/**
* Fillable fields for a Profile.
*
Expand All @@ -68,7 +57,15 @@ class Activity extends Model
'methodType',
];

/**
* The attributes that should be mutated.
*
* @var array
*/
protected $casts = [
'created_at' => 'datetime',
'updated_at' => 'datetime',
'deleted_at' => 'datetime',
'description' => 'string',
'details' => 'string',
'user' => 'integer',
Expand Down