GitPedia
franzose

franzose/ClosureTable

Adjacency List’ed Closure Table database design pattern implementation for the Laravel framework.

30 Releases
Latest: 4mo ago
v6.2.2Latest
franzosefranzose·4mo ago·February 1, 2026
GitHub

📋 What's Changed

  • Column disambiguation in closure table queries (#252) by @franzose in https://github.com/franzose/ClosureTable/pull/284 (originally @Djuuu in https://github.com/franzose/ClosureTable/pull/252)
  • Full Changelog: https://github.com/franzose/ClosureTable/compare/v6.2.1...v6.2.2
v6.2.1
franzosefranzose·5mo ago·January 29, 2026
GitHub

📋 What's Changed

  • feat: add parent_id column to fillable at construct by @penerbangkode in https://github.com/franzose/ClosureTable/pull/257

New Contributors

  • @penerbangkode made their first contribution in https://github.com/franzose/ClosureTable/pull/257
  • Full Changelog: https://github.com/franzose/ClosureTable/compare/v6.2...v6.2.1
v6.2
franzosefranzose·5mo ago·January 27, 2026
GitHub

📋 What's Changed

  • fix: handle root sibling ordering and add tests by @franzose in https://github.com/franzose/ClosureTable/pull/259
  • fix: child positioning by @franzose in https://github.com/franzose/ClosureTable/pull/260
  • fix: prevent moving node under its descendant by @franzose in https://github.com/franzose/ClosureTable/pull/261
  • fix: honor provided connection in newFromBuilder by @franzose in https://github.com/franzose/ClosureTable/pull/262
  • fix: enable soft deletes on base entity by @franzose in https://github.com/franzose/ClosureTable/pull/263
  • fix: reorder siblings when moving within same parent by @franzose in https://github.com/franzose/ClosureTable/pull/264
  • fix: implement a number of fixes by @franzose in https://github.com/franzose/ClosureTable/pull/265
  • Full Changelog: https://github.com/franzose/ClosureTable/compare/v6.1.1...v6.2
Fixed hardcoded table column names in the ClosureTable modelv6.1.1
franzosefranzose·5y ago·October 6, 2020
GitHub

Thanks to @devig who pointed this out in #234. This issue has been moved to #238 and fixed by this release.

Minor tweaksv6.1.0
franzosefranzose·5y ago·October 5, 2020
GitHub

1. Laravel 8 support in tests, thanks to @avvertix 2. `Entity::parent()` many-to-one relationship to the direct ancestor node 3. Minor tweaks

Fixed regression in the Collection::toTree() methodv6.0.1
franzosefranzose·6y ago·May 11, 2020
GitHub

This is a small release which brings a fix to the regression [pointed out](https://github.com/franzose/ClosureTable/issues/231) by @ritterg.

ClosureTable 6v6.0
franzosefranzose·6y ago·May 4, 2020
GitHub

📦 Improvements

  • 1. Fixed a lot of bugs related to positioning and movements between ancestors
  • 2. Introduced a bunch of [query scopes](https://github.com/franzose/ClosureTable#scopes) to ease querying. They allowed to simplify the internals too!
  • 3. Introduced some [convenient methods](https://github.com/franzose/ClosureTable#collection-methods) to the custom collection in addition to the existing ones
  • 3. Fixed bugs in the model and migration generators
  • 4. Improved tests and automated Travis CI builds. Many many thanks to @avvertix for the latter!

🗑️ Deprecations

  • 3. Entity's `real_depth` attribute & database column have been deprecated and are not included in the generated model and migration anymore
  • 4. The following methods of the Entity model has been deprecated and will be removed in the next major release:
  • Entity::getRealDepthColumn()
  • Entity::getChildrenRelationIndex()
  • Entity::getAncestorsTree()
  • Entity::getAncestorsWhere()
  • Entity::getDescendantsTree()
  • Entity::getDescendantsWhere()
  • + 4 more

📦 Other notes

  • PHP 5.6 support has been dropped. Starting from this release, ClosureTable supports PHP 7.0 and higher.
Fixes and improvementsv5.1.1
franzosefranzose·7y ago·August 27, 2018
GitHub

Fixes and improvements by @dcanaud and @gulch.

Compatibility with Laravel 5.5v5.1
franzosefranzose·8y ago·September 10, 2017
GitHub

Thanks to @dcanaud, the package now supports Laravel 5.5.

Minor fixv5.0.1
franzosefranzose·8y ago·July 13, 2017
GitHub
Laravel 5.4 supportv5.0
franzosefranzose·9y ago·February 10, 2017
GitHub

Thanks to @krutuzick pull request, the library now supports Laravel 5.4+.

Rolled back bindings due to PostgreSQL behavior4.1.4
franzosefranzose·9y ago·July 8, 2016
GitHub
A fix for raw DB queriesv4.1.3
franzosefranzose·9y ago·July 6, 2016
GitHub

I introduced params binding for raw queries in ClosureTable model.

A little updatev4.1.2
franzosefranzose·9y ago·July 6, 2016
GitHub

I have removed checks for ancestor and descendant arguments to be integers because there are situations when one needs to use another column type.

ClosureTable 4.1.1v4.1.1
franzosefranzose·10y ago·January 6, 2016
GitHub

Another Composer dependency fix.

ClosureTable 4.1v4.1
franzosefranzose·10y ago·January 3, 2016
GitHub

Added support for Laravel 5.2 + other fixes.

ClosureTable 4.0.1v4.0.1
franzosefranzose·11y ago·March 9, 2015
GitHub

Minor fixes by @EspadaV8.

ClosureTable 4v4
franzosefranzose·11y ago·March 9, 2015
GitHub

Big big thanks to @EspadaV8 work! Now that his pull request has been accepted we can release a new package version. ClosureTable 4 fully supports Laravel 5 and also follows PSR-2 coding standard. Stay enjoing hierarchical relations!

ClosureTable 3.1.1v3.1.1
franzosefranzose·11y ago·February 14, 2015
GitHub

In this release, I added the third optional argument to `addChild()` and `addSibling()` methods that allows you to get the child or sibling that's being added to an ancestor. Please, explore readme for the examples.

Closure Table 3.1v3.1
franzosefranzose·11y ago·February 3, 2015
GitHub

In this release, issues with `removeChild` and `deleteSubtree` methods have been resolved. If you have already been using the package, please set `on delete set null` constraint to the `parent_id` foreign key on your entity table, if that constraint has not been set yet.

Closure Table 3.0.5v3.0.5
franzosefranzose·11y ago·January 5, 2015
GitHub

Minor fixes.

ClosureTable 3.0.4v3.0.4
franzosefranzose·12y ago·June 2, 2014
GitHub

Many many fixes. Huge thanks to @tomzx for help. Also thanks to all guys who discovered the issues.

ClosureTable 3.0.3v3.0.3
franzosefranzose·12y ago·March 27, 2014
GitHub

Fixed generator that stripped out the first letter of the models. Fixed entity migration stub, made `parent_id` column unsigned to prevent foreign key constraints. Thanks to @kmccarthyweb for the issues.

ClosureTable 3.0.2v3.0.2
franzosefranzose·12y ago·March 26, 2014
GitHub

Finally, I hope that it is, I fixed nodes reordering and moving bugs. Real depth of all descendants of a node now is updated properly when the node is moved somewhere. Also I added guessing of closure table name if its default model class (i.e. `Franzose\ClosureTable\Models\ClosureTable`) is not changed to something else. P.S. Highly recommended for you to update your ClosureTable to this release.

ClosureTable 3.0.1v3.0.1
franzosefranzose·12y ago·March 13, 2014
GitHub

Fixed suddenly arisen issues with reordering siblings.

ClosureTable 3.0v3.0
franzosefranzose·12y ago·March 12, 2014
GitHub

The new version introduces an injection of the Adjacency List pattern to the pure Closure Table. Adjacency list's features allows to simplify most of the database queries dramatically. In the new version, all the existed bugs were fixed. I also introduced a method, that the community requested long ago. It is called `createFromArray` and is used to create a bunch of records by just passing an array of attributes to it. However, the feature I mentioned is not the only thing I added while developing the 3.0. Explore the source!

ClosureTable 2.1.6v2.1.6
franzosefranzose·12y ago·October 5, 2013
GitHub

Fixed wrong behaviour after `appendChild` with `$returnChild = true`, when retrieving of siblings led to wrong results.

ClosureTable 2.1.5v2.1.5
franzosefranzose·12y ago·October 4, 2013
GitHub

Fixes: 1. #27, database table prefix led to wrong closure table name. 2. #25, wrong behaviour happened while moving a descendant to a new ancestor by using moveTo(). 3. #42, #37, #32, wrong position was set when an entity was moved or created. 4. #43, position was updated even if a user tried to move an entity to the same ancestor it already belonged to.

ClosureTable 2.1v2.1
franzosefranzose·12y ago·September 28, 2013
GitHub

In this release: 1. Introducing `filteredTree` method, see #18. You can use it when it's necessary to get a tree, filtered by some condition. 2. Fixed #19 (An exception thrown by `\Franzose\ClosureTable\Collection` when tree is empty). 3. Retrieval methods now support selecting certain columns by passing array with their names. _Thanks to @vjandrea for the first two improvements._

ClosureTable 2v2.0
franzosefranzose·12y ago·September 23, 2013
GitHub

Now the package for Laravel 4. It has a lot of improvements over the previous version and still no dependencies on other packages.