mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
commit
91fa28d399
@ -4,4 +4,13 @@ use Anomaly\Streams\Platform\Entry\EntryCollection;
|
||||
|
||||
class CategoryCollection extends EntryCollection
|
||||
{
|
||||
|
||||
public function mainCategories()
|
||||
{
|
||||
return $this->filter(
|
||||
function ($category) {
|
||||
return (is_null($category->parent_category_id));
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user