mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
commit
d1620343c2
@ -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();
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user