cline/ancestry
Closure table hierarchies for Laravel Eloquent. Manage deep trees (org charts, categories) with O(1) ancestor/descendant queries, fluent APIs, configurable keys/types, events, and snapshots for point-in-time hierarchy state.
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.
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
If you discover any security related issues, please use the GitHub security reporting form rather than the issue queue.
The MIT License. Please see License File for more information.
How can I help you explore Laravel packages today?