Participant model last_read property casts MISSING under Laravel 10
deviddev opened this issue · 1 comments
deviddev commented
Hi!
In Laravel 10 the $dates model property was removed, so the Participants model last_read property is not casts to datetime (Carbon instance), this will be string.
Laravel 10 Upgrade Guide
This makes exceptions if u want to use last_read with Carbon methods.
Solution
Just add "direct' casts to last_read property in Participant model.
protected $casts = [
'last_read' => 'datetime'
];
cmgmyr commented
Thanks!