NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #1181 most downloaded on Packagist
Nested Set Model for Laravel 5.7 and up
Latest stable
v7.0.0
Last release 7 months ago
11 Apr 2026
Ships fairly regularly
a new release about every 6 months
Some releases are documented
notes for 18 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
64 releases · first in 2013
Drag across the ruler to compare, or tap a release to open it.
Nothing published for this version
Nothing published for this version
Fixes php 8.4 deprecation warnings like: "Implicitly marking paramete… by @julesgraus in https://github.com/lazychaser/laravel-nestedset/pull/607
Full Changelog: https://github.com/lazychaser/laravel-nestedset/compare/v6.0.5...v6.0.6
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Laravel 12 support by @jonnott in https://github.com/lazychaser/laravel-nestedset/pull/610
Full Changelog: https://github.com/lazychaser/laravel-nestedset/compare/v6.0.4...v6.0.5
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
* Support Laravel 5.8
* Support Laravel 5.7
Added nestedSet and dropNestedSet blueprint macros
nestedSet and dropNestedSet blueprint macrosNothing published for this version
Added fixSubtree and rebuildSubtree methods
fixSubtree and rebuildSubtree methods* #217: parent_id, lft and rgt are reset when replicating a node
Nothing published for this version
refactored ancestors and descendants relations
Fixed issues related to rebuilding tree when using SoftDeletes and scoping
SoftDeletes and scopingAdded whereAncestorOrSelf, ancestorsAndSelf, descendantsOrSelf, whereDescendantOrSelf helper methods
whereAncestorOrSelf, ancestorsAndSelf, descendantsOrSelf,
whereDescendantOrSelf helper methodswhereIsLeaf and leaves method, added isLeaf check on nodeNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
For smooth transition, Node class is still available but is now deprecated and will be removed in the next significant release. Also, some methods wer…
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 appendToNodeprependTo to prependToNodeinsertBefore to insertBeforeNodeinsertAfter to insertAfterNodegetNext to getNextNodegetPrev to getPrevNodecountErrorshasChildren and hasParent are now deprecated. Use has('children')
has('parent') insteadsiblings(), descendants(),
prevNodes, nextNodeshasChildren and hasParent are now deprecated. Use has('children') has('parent') instead
appendTo to appendToNodeprependTo to prependToNodeinsertBefore to insertBeforeNodeinsertAfter to insertAfterNodegetNext to getNextNodegetPrev to getPrevNodecountErrorshasChildren and hasParent are now deprecated. Use has('children')
has('parent') insteadsiblings(), descendants(),
prevNodes, nextNodesNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fixed #42: model becomes dirty before save when parent is changed and using appendTo, prependTo, insertBefore, insertAfter.
appendTo,
prependTo, insertBefore, insertAfter.Added fixTree method for fixing lft/rgt values based on inheritance
fixTree method for fixing lft/rgt values based on inheritanceRenamed append to appendNode, prepend to prependNode
append to appendNode, prepend to prependNodenext to nextNodes, prev to prevNodesafter to afterNode, before to beforeNodeNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Added query methods whereNotDescendantOf, orWhereDescendantOf, orWhereNotDescendantOf
whereNotDescendantOf, orWhereDescendantOf, orWhereNotDescendantOfwhereAncestorOf, whereDescendantOf and every method that depends on them can now accept node instanceNode::getBounds that returns an array of node bounds that can be used in whereNodeBetweenNothing published for this version
Nothing published for this version
Added linkNodes method to Collection class
linkNodes method to Collection class* Support Laravel 5
Added isChildOf, isAncestorOf, isSiblingOf methods
isChildOf, isAncestorOf, isSiblingOf methodsNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.