vusys/laravel-nestedset
A modern Laravel nested-set implementation for hierarchical Eloquent data, featuring strict types, PHPStan level 9, atomic CASE-WHEN mutations, multi-tree scoping, and soft deletes. Supports PHP 8.3 and Laravel 11, 12, or 13.
parent_id traversal, so we can ship subtree retrieval, breadcrumbs, drag-and-drop reordering, and "all descendants" views on a predictable, queryable structure.kalnoy/nestedset. It shifts effort from maintenance to product.Consider it when:
Look elsewhere when:
kalnoy/nestedset (or a framework-native approach) is the safer default for mission-critical trees.To executives: This is a small, MIT-licensed building block that lets us ship hierarchical features (categories, org charts, menus, permissions) faster and cheaper than building custom tree logic. It carries no licensing cost and fits our existing Laravel stack. The main caveat is low current adoption, so we recommend a time-boxed evaluation and a fallback plan rather than a blind commitment — this keeps risk contained while capturing the speed benefit.
To engineering: The library implements nested sets with a modern test discipline — CI matrix, code coverage, mutation testing, and performance benchmarking — which suggests someone is taking correctness and performance seriously. It removes a class of recursive-query bugs and gives us consistent subtree/ancestor APIs. Before adopting broadly, we should run a spike against our real data volumes, verify release/API stability and maintainer activity (release noted, but zero dependents), and confirm it handles our reorder frequency. If it holds up, it saves us reinventing a well-understood pattern; if not, kalnoy/nestedset remains the proven fallback.
How can I help you explore Laravel packages today?