New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

cline/ancestry

Closure table hierarchies for Eloquent models with O(1) ancestor/descendant queries.
22,371 1
Install
composer require cline/ancestry
Latest Version:2.1.0
PHP:^8.5.0
Laravel:10 – 13
License:MIT
Last Updated:Oct 22, 2026
Links: GitHub  ·  Packagist
Maintainer: faustbrian

GitHub Workflow Status Latest Version on Packagist Software License Total Downloads


Ancestry

Closure table hierarchies for Eloquent models with O(1) ancestor/descendant queries.

Ancestry implements the closure table pattern for managing hierarchical relationships in Laravel. This enables efficient queries for ancestors and descendants without recursion limits, supporting deeply nested relationships like organizational charts, sales hierarchies, and category trees.

Documentation

Change log

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please use the GitHub security reporting form rather than the issue queue.

Credits

License

The MIT License. Please see License File for more information.

Related Packages

jiaxincui/closure-table

A closure table tree package for laravel eloquent

9,098 111
baum/baum

Baum is an implementation of the Nested Set pattern for Eloquent models.

1,729,931 2,219
webx-ui/nested-set

Nested set (modified preorder tree traversal) for Eloquent models: ordered trees...

2,033 0
nevadskiy/laravel-tree

Tree-like structure for Eloquent models.

135,355 70
kisame76/filament-tree-table

Expandable parent/child tree rows for Filament v4.3+ & v5 tables — inline sub-ro...

8,898 5

Version History

Version Released PHP Laravel License
2.1.0 ^8.5.0 ^10.0 || ^11.0 || ^12.0 || ^13.0 MIT
2.0.3 ^8.5.0 ^10.0 || ^11.0 || ^12.0 || ^13.0 MIT
2.0.2 ^8.5.0 ^10.0 || ^11.0 || ^12.0 || ^13.0 MIT
2.0.1 ^8.5.0 ^10.0 || ^11.0 || ^12.0 || ^13.0 MIT
2.0.0 ^8.5.0 ^10.0 || ^11.0 || ^12.0 || ^13.0 MIT