Closed frantisek-heca closed 4 years ago
I would start from the root level taxons and then iterate through the children:
foreach ($taxonomy->rootLevelTaxons() as $root) {
foreach ($root->children() as $child) {
$child->children();//...and so on
}
}
Please, I haven't tried this package, but I am mostly interested if children method will return all nested categories, preferably in a tree view (nested array)?
If not, how would you get it? For building menus.