# lazychaser/laravel-nestedset

Effective tree structures in Laravel 4-8

Repository: https://github.com/lazychaser/laravel-nestedset
Canonical: https://ross.abutalabs.com/products/laravel-nestedset
Language: PHP
License Family: other
Topics: php, nested-set, laravel, hierarchical-data, menus, tree-structure, trees
Last push: 2026-04-11T13:46:29+00:00

## Health v2 (maintenance only)
Score: 64/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 76, release rhythm 28, longevity 100
- inputs: {"age_days": 4722, "days_push": 144, "days_rel": 464, "gap_med": 66, "n_releases_24m": 2}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3802, forks 480 (observed 2026-08-28T04:08:20.176050+00:00)

## What it is
A Laravel Eloquent package implementing the nested set model for storing and querying hierarchical data like trees in relational databases. It provides relationships and operations for inserting, moving, retrieving, and deleting tree nodes.

## Use cases
- build multi-depth menus in laravel
- store product categories with nested hierarchy
- manage tree structures in a relational database
- query ancestors and descendants of a node
- implement hierarchical comments or org charts

## When to choose
- your Laravel app needs hierarchical data that is read frequently but updated rarely
- you want eager-loadable parent/children/ancestors/descendants relationships
- you need fast subtree and depth queries in SQL

## When to avoid
- your tree is updated very frequently, since nested set updates require expensive renumbering
- you are not using Laravel or Eloquent
- you only need simple one-level parent-child relations where adjacency lists suffice

## Facets
- artifact type: library
- maturity: active
- function: orm, database, data-science
- domain: databases, web-development, backend
- platform: php
- tags: laravel, nested-set, hierarchical-data, tree-structure, eloquent, web-server

## Member repositories
- lazychaser/laravel-nestedset (main) score 64

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:20.176050+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:26:48.436733+00:00, confidence not recorded.
  - readme: https://github.com/lazychaser/laravel-nestedset (fetched 2026-08-28T04:08:20.176050+00:00, sha 887740227544)
- Data as of 2026-08-30T08:39:29.467469+00:00.
