Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Nestedset Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature-level: Enables hierarchical data models out of the box — category and product taxonomies, org charts, threaded comments, CMS/page trees, multi-level navigation, permission/resource hierarchies, and any "folders inside folders" experience.
  • Roadmap-level: Lets us model trees without recursive CTEs or ad-hoc parent_id traversal, so we can ship subtree retrieval, breadcrumbs, drag-and-drop reordering, and "all descendants" views on a predictable, queryable structure.
  • Build vs. buy (open source): This is a "consume an MIT-licensed library" decision versus (a) hand-rolling recursive queries, closure tables, or materialized paths, or (b) adopting the established kalnoy/nestedset. It shifts effort from maintenance to product.
  • Read/write trade-off: Nested-set shines on read-heavy hierarchies (fast subtree/ancestor queries), which matters for catalogs, nav trees, and permission resolution. It also signals an architectural stance we should make explicitly: "optimize for hierarchy reads, absorb write cost on reordering."
  • Standardization: An opportunity to standardize tree modeling across teams and avoid duplicated in-house solutions, reducing long-term maintenance and knowledge silos.

When to Consider This Package

Consider it when:

  • We are on Laravel/PHP and have one or more of the hierarchical use cases above.
  • The hierarchy is read-heavy — frequent subtree/ancestor queries, breadcrumbs, or "everything under node X" — and reorders/moves are relatively infrequent.
  • We value modern engineering hygiene: the README shows a strong test posture (CI matrix, coverage, mutation testing, benchmark tracking), which is a quality signal worth verifying in a spike.
  • We can absorb adoption risk and run a short evaluation before committing.

Look elsewhere when:

  • We need proven production adoption. With 0 stars and 0 dependents, this package is unproven; the established kalnoy/nestedset (or a framework-native approach) is the safer default for mission-critical trees.
  • Trees are write- or move-heavy (frequent drag-and-drop reordering). Nested-set updates are more expensive; consider closure table or adjacency list instead.
  • We are outside Laravel or need a portable data model.
  • Compliance, maintenance, or vendor-concentration policies require demonstrated community traction.

How to Pitch It (Stakeholders)

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core