mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-24 22:11:01 -06:00
Show Horizontal Menu Icons
This commit is contained in:
parent
d1a676b409
commit
4e9c97560e
@ -1,10 +1,26 @@
|
|||||||
<?php namespace Visiosoft\CatsModule\Category;
|
<?php namespace Visiosoft\CatsModule\Category;
|
||||||
|
|
||||||
|
use Anomaly\Streams\Platform\Image\Command\MakeImageInstance;
|
||||||
use Visiosoft\CatsModule\Category\Contract\CategoryInterface;
|
use Visiosoft\CatsModule\Category\Contract\CategoryInterface;
|
||||||
use Anomaly\Streams\Platform\Model\Cats\CatsCategoryEntryModel;
|
use Anomaly\Streams\Platform\Model\Cats\CatsCategoryEntryModel;
|
||||||
|
|
||||||
class CategoryModel extends CatsCategoryEntryModel implements CategoryInterface
|
class CategoryModel extends CatsCategoryEntryModel implements CategoryInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
|
protected $appends = [
|
||||||
|
'icon_url',
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
public function getIconUrlAttribute()
|
||||||
|
{
|
||||||
|
if ($this->icon === null) {
|
||||||
|
return $this->dispatch(new MakeImageInstance('visiosoft.module.advs::images/listing/sample-cat-icon.svg', 'img'))->url();
|
||||||
|
}
|
||||||
|
|
||||||
|
return url($this->icon);
|
||||||
|
}
|
||||||
|
|
||||||
public function getCat($id)
|
public function getCat($id)
|
||||||
{
|
{
|
||||||
return CategoryModel::query()
|
return CategoryModel::query()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user