mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-06 05:16:05 -06:00
Merge pull request #1189 from openclassify/muammer
#4656 category image error
This commit is contained in:
commit
46ec1f4122
@ -13,11 +13,9 @@ class CategoryModel extends CatsCategoryEntryModel implements CategoryInterface
|
|||||||
|
|
||||||
public function getIconUrlAttribute()
|
public function getIconUrlAttribute()
|
||||||
{
|
{
|
||||||
if ($this->icon === null) {
|
return $this->dispatch(
|
||||||
return $this->dispatch(new MakeImageInstance('visiosoft.module.advs::images/listing/sample-cat-icon.svg', 'img'))->url();
|
new MakeImageInstance($this->icon ?? 'visiosoft.module.advs::images/listing/sample-cat-icon.svg', 'img')
|
||||||
}
|
)->url();
|
||||||
|
|
||||||
return url($this->icon);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCat($id)
|
public function getCat($id)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user