Skip to content

Commit edb5fa1

Browse files
committed
feat: add Eloquent cast into ImageModel
1 parent a92eff3 commit edb5fa1

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/app/Models/Image.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ class Image extends Model
2222
'updated_at',
2323
];
2424

25+
public function casts(): array
26+
{
27+
return [
28+
'is_primary' => 'boolean',
29+
];
30+
}
31+
2532
public function worldHeritage()
2633
{
2734
return $this->belongsTo(WorldHeritage::class, 'world_heritage_site_id', 'id');

0 commit comments

Comments
 (0)