test
This commit is contained in:
@@ -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])) {
|
||||
|
||||
Reference in New Issue
Block a user