NestedsetCollection
class NestedsetCollection extends Collection (View source)
Methods
toTree(mixed $root = false)
Build a tree from a list of nodes. Each item will have set children relation.
Details
NestedsetCollection
toTree(mixed $root = false)
Build a tree from a list of nodes. Each item will have set children relation.
To successfully build tree "id", "_lft" and "parent_id" keys must present.
If $root
is provided, the tree will contain only descendants of that node.