Skip to content

Commit 2f16013

Browse files
authored
Merge pull request #1 from ChrisHardie/maint/model-cast-fix
Update model attribute casting
2 parents 568010e + 3b1de93 commit 2f16013

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to `laravel-feedmaker` will be documented in this file.
44

5+
## 1.0.6 - 2024-01-03
6+
7+
- fix: update model attribute casting for modern Laravel
8+
59
## 1.0.5 - 2021-10-06
610

711
- fix: encode HTML entities in RSS item guid field

src/Models/Source.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ class Source extends Model
2525
'next_check_after',
2626
];
2727

28-
protected $dates = [
29-
'last_check_at',
30-
'last_succeed_at',
31-
'last_fail_at',
32-
'next_check_after',
28+
protected $casts = [
29+
'last_check_at' => 'datetime',
30+
'last_succeed_at' => 'datetime',
31+
'last_fail_at' => 'datetime',
32+
'next_check_after' => 'datetime',
3333
];
3434

3535
public function getBaseUrlAttribute($value)

0 commit comments

Comments
 (0)