Skip to content

Releases: lazychaser/laravel-nestedset

v4.1.0

02 Mar 07:58
Compare
Choose a tag to compare

New features

Converted to trait

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).

Scoping

You can now store multiple trees in the same table by filtering using model attributes. Read more.

Rebuilding a tree

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.

Descendants as a relation

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();

Other

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.

v4.1.0-beta

24 Feb 04:23
Compare
Choose a tag to compare
v4.1.0-beta Pre-release
Pre-release
  • #75: Converted to trait. Following methods were renamed:
  • appendTo to appendToNode
  • prependTo to prependToNode
  • insertBefore to insertBeforeNode
  • insertAfter to insertAfterNode
  • getNext to getNextNode
  • getPrev to getPrevNode
  • #82: Fixing tree now handles case when nodes pointing to non-existing parent
  • The number of missing parent is now returned when using countErrors
  • #79: implemented scoping feature
  • #81: moving node now makes model dirty before saving it
  • #45: descendants is now a relation that can be eagerly loaded
  • hasChildren and hasParent are now deprecated. Use has('children')
    has('parent') instead
  • Default order is no longer applied for siblings(), descendants(),
    prevNodes, nextNodes
  • #50: implemented tree rebuilding feature

v2.0-beta2

15 Jul 15:53
Compare
Choose a tag to compare
v2.0-beta2 Pre-release
Pre-release
Add donate button

v2.0-beta

17 Jun 06:52
Compare
Choose a tag to compare
v2.0-beta Pre-release
Pre-release
Fix incompatibilities

Migrate to Laravel 4.2

05 Jun 09:22
Compare
Choose a tag to compare
v1.1

Merge branch '1.1'