Bot releases are hidden (Show)
Nested set features are now enabled using a trait and overrides as less methods as possible. For smooth transition, Node
class is still available but is now deprecated and will be removed in the next significant release. Also, some methods were renamed (see changelog).
You can now store multiple trees in the same table by filtering using model attributes. Read more.
In this release, tree rebuilding feature is added. You can completely rebuild a tree from an array. This can be used when you editing your tree on the client side and then sending full tree to the server. Algorithm updates nodes based on primary key, creates new ones and can delete nodes that are not on array. More info.
Nodes now have descendants
relation which can be eagerly loaded. This is helpful when you have a large tree and need to load few subtrees:
$nodes = Category::with('descendants')->whereIn('id', $idList)->get();
hasParent
and hasChildren
is now deprecated in favor of default laravel functionality has('parent')
and has('children')
.
Default order is no longer applied for siblings()
, descendants()
, prevNodes()
, nextNodes()
.
Other small features and bug fixes. See changelog.
appendTo
to appendToNode
prependTo
to prependToNode
insertBefore
to insertBeforeNode
insertAfter
to insertAfterNode
getNext
to getNextNode
getPrev
to getPrevNode
countErrors
hasChildren
and hasParent
are now deprecated. Use has('children')
has('parent')
insteadsiblings()
, descendants()
,prevNodes
, nextNodes
Published by lazychaser over 10 years ago