#2070 emlaktown pyro add

This commit is contained in:
Diatrex 2020-09-04 16:43:19 +03:00
parent 07e1bdd360
commit 503f8dddad
2 changed files with 2 additions and 7 deletions

View File

@ -20,10 +20,7 @@ class CategoryCriteria extends EntryCriteria
}
public function getMainCats() {
$mainCats = $this->categoryRepository->newQuery()
->whereNull('parent_category_id')
->orderBy('sort_order')
->get();
$mainCats = $this->categoryRepository->mainCats();
foreach ($mainCats as $cat) {
$subCount = $this->categoryRepository->newQuery()->where('parent_category_id', $cat->id)->count();

View File

@ -5,8 +5,6 @@ use Anomaly\Streams\Platform\Entry\EntryCriteria;
class CityCriteria extends EntryCriteria
{
public function getSubCities($city) {
$this->query->where('parent_country_id', $city)->get();
return $this;
return $this->query->where('parent_country_id', $city)->get();
}
}