staudenmeir/laravel-adjacency-list
Laravel Eloquent extension for recursive tree and graph relationships using SQL common table expressions. Traverse ancestors, descendants, and paths in adjacency-list data across MySQL, Postgres, SQLite, SQL Server, and more; supports one-to-many trees and many-to-many graphs.
Adopt if:
Look elsewhere if:
parent_id joins suffice.laravel-nestedset."This package lets us handle nested data (like org charts or product categories) 10x faster by offloading recursive logic to the database. Instead of slow PHP loops, we’ll use optimized SQL queries, cutting backend load and improving scalability for features like [X use case]. It’s a drop-in solution that saves dev time and future-proofs our architecture for hierarchical growth."
*"Laravel Adjacency List replaces manual recursion with CTE-based queries, giving us:
descendants(), ancestors(), and toTree() for nested data.Key Metric to Track: Query execution time for hierarchical data (e.g., "Load a 5-level category tree in <50ms").
How can I help you explore Laravel packages today?