mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 23:06:08 -06:00
added get sub categories
This commit is contained in:
parent
166e594e71
commit
1af16e10a0
@ -64,4 +64,9 @@ class CategoryModel extends CatsCategoryEntryModel implements CategoryInterface
|
|||||||
{
|
{
|
||||||
$this->update(['icon' => $url]);
|
$this->update(['icon' => $url]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getSubCategories()
|
||||||
|
{
|
||||||
|
return $this->where('parent_category_id', $this->getId())->get();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,4 +13,6 @@ interface CategoryInterface extends EntryInterface
|
|||||||
public function getMains($id);
|
public function getMains($id);
|
||||||
|
|
||||||
public function setCategoryIconUrl($url);
|
public function setCategoryIconUrl($url);
|
||||||
|
|
||||||
|
public function getSubCategories();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user