This commit is contained in:
2026-04-15 20:03:19 +05:00
parent f8b1bc7369
commit 7c992ed12e
12 changed files with 98 additions and 12 deletions

View File

@@ -53,6 +53,8 @@ class Category extends Model
'title_seo' => 'array',
'is_filter_power' => 'boolean'
];
protected $appends = ['image_url'];
protected $hidden = [
'created_at',
@@ -137,6 +139,11 @@ class Category extends Model
return '';
}
public function getImageUrlAttribute(): string
{
return $this->getImage();
}
public function getImage(): string
{
if (!in_array($this->image, ['null', null])) {