Skip to content

Commit 3933276

Browse files
committed
casts() method
1 parent 2fb997a commit 3933276

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/Models/Event.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,16 @@ class Event extends Base
2424

2525
protected string $presenter = ModulePresenter::class;
2626

27-
protected $casts = [
28-
'start_date' => 'datetime:Y-m-d',
29-
'end_date' => 'datetime:Y-m-d',
30-
];
27+
/**
28+
* @return array<string, string>
29+
*/
30+
protected function casts(): array
31+
{
32+
return [
33+
'start_date' => 'datetime:Y-m-d',
34+
'end_date' => 'datetime:Y-m-d',
35+
];
36+
}
3137

3238
protected $guarded = [];
3339

0 commit comments

Comments
 (0)