mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-24 22:11:01 -06:00
Merge pull request #1149 from openclassify/revert-1147-muammertop
Revert "#4452 [evdepismis-theme] Create theme"
This commit is contained in:
commit
5aa701a1fa
@ -1,26 +1,10 @@
|
|||||||
<?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()
|
||||||
|
|||||||
@ -51,10 +51,6 @@ class AjaxController extends PublicController
|
|||||||
$id = explode(',', $this->request->id);
|
$id = explode(',', $this->request->id);
|
||||||
$query = $this->cityRepository->getModel()->whereIn('parent_country_id', $id);
|
$query = $this->cityRepository->getModel()->whereIn('parent_country_id', $id);
|
||||||
|
|
||||||
if ($this->request->search) {
|
|
||||||
$query->where('name', 'like', '%' . $this->request->search . '%');
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->queryOrder($query, $this->cityRepository);
|
return $this->queryOrder($query, $this->cityRepository);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -158,4 +154,4 @@ class AjaxController extends PublicController
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user