mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-10 23:36:08 -06:00
#2070 emlaktown pyro add
This commit is contained in:
parent
07e1bdd360
commit
503f8dddad
@ -20,10 +20,7 @@ class CategoryCriteria extends EntryCriteria
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getMainCats() {
|
public function getMainCats() {
|
||||||
$mainCats = $this->categoryRepository->newQuery()
|
$mainCats = $this->categoryRepository->mainCats();
|
||||||
->whereNull('parent_category_id')
|
|
||||||
->orderBy('sort_order')
|
|
||||||
->get();
|
|
||||||
|
|
||||||
foreach ($mainCats as $cat) {
|
foreach ($mainCats as $cat) {
|
||||||
$subCount = $this->categoryRepository->newQuery()->where('parent_category_id', $cat->id)->count();
|
$subCount = $this->categoryRepository->newQuery()->where('parent_category_id', $cat->id)->count();
|
||||||
|
|||||||
@ -5,8 +5,6 @@ use Anomaly\Streams\Platform\Entry\EntryCriteria;
|
|||||||
class CityCriteria extends EntryCriteria
|
class CityCriteria extends EntryCriteria
|
||||||
{
|
{
|
||||||
public function getSubCities($city) {
|
public function getSubCities($city) {
|
||||||
$this->query->where('parent_country_id', $city)->get();
|
return $this->query->where('parent_country_id', $city)->get();
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user