added category

This commit is contained in:
vedatakd 2020-10-28 13:46:36 +03:00
parent 7123f56ba2
commit d8ac259197

View File

@ -4,4 +4,13 @@ use Anomaly\Streams\Platform\Entry\EntryCollection;
class CategoryCollection extends EntryCollection class CategoryCollection extends EntryCollection
{ {
public function mainCategories()
{
return $this->filter(
function ($category) {
return (is_null($category->parent_category_id));
}
);
}
} }