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

Baum Laravel Package

yajra/baum

yajra/baum adds nested set trees to Laravel Eloquent, so you can store and query hierarchical data like categories and menus. Create, move, and reorder nodes and fetch ancestors, descendants, and siblings efficiently through an intuitive ActiveRecord-style API.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • The hierarchy architecture fork. Any roadmap item that stores trees — category taxonomies, navigation menus, threaded comments, org charts, permission scopes, file/folder structures — forces a genuine decision between nested set (lft/rgt/depth), adjacency list with recursive CTEs, materialized path, or closure table. yajra/baum is one candidate in that fork, and a legitimate one only when reads dominate writes and the tree is deep enough that recursive traversal shows up as a measurable cost.
  • A debt decision, not an investment decision. The package's strongest real justification is as the continuation of the abandoned etrepat/baum (Laravel 4/5 era). The PM question it actually answers is "do we contain the tree logic we already run, or fund a migration to kalnoy/nestedset?" — not "should we adopt a new strategic dependency."
  • Build vs. buy vs. vendor-and-own. The implementation surface is small and auditable (a few hundred lines of tree logic). At 6 stars, 0 dependents, and a 0.06 score, the "buy" value is thin: a tested internal trait is a defensible alternative to adopting a package with no community safety net.
  • Roadmap prioritization and deprioritization. This is a low-signal option. The default PM call is to keep it off greenfield work and redirect engineering attention to a broadly adopted alternative — the cost of a wrong tree implementation surfaces as bad data, not as an alert.
  • Platform and portability scope. If the product must run on MySQL, PostgreSQL, SQLite, and SQL Server, nested set vs. CTE/ltree is a platform-level bet (raw SQL range updates, driver-specific locking, index strategy), not an implementation detail a developer should settle alone.
  • Risk acceptance with a named budget line. Keeping it means owning an internal library: framework-upgrade upkeep, security review, and invariant test coverage. That is a contained, predictable cost — but it needs an owner and a line item rather than an assumption.

When to Consider This Package

Consider it when:

  • You already run etrepat/baum or an older Baum fork in an existing Laravel codebase and need the lowest-friction path to keep it alive. This is the single strongest argument for yajra/baum.
  • The hierarchy is deep and strictly read-heavy — static category trees, menus, permission scopes — where cheap subtree reads and ancestor checks genuinely matter and re-parenting is rare.
  • You want a drop-in Eloquent model base class (extend Baum\Node) rather than a query-builder abstraction, and the team already models hierarchies with lft/rgt/depth and understands the write amplification.
  • Licensing is a hard constraint and an MIT-licensed package you can vendor and maintain internally removes legal friction.
  • You need a compact reference implementation to read before committing to the nested set pattern at all.

Look elsewhere when:

  • It is a new project. kalnoy/nestedset is the de facto Eloquent nested set implementation with far broader adoption, active maintenance, and comparable semantics.
  • You are on Laravel 10+/11 or PHP 8.2+ and need guaranteed compatibility. There is no public evidence of ongoing maintenance, and the package's reliance on Eloquent events, save/delete hooks, and query-builder internals is exactly the surface that has churned from Laravel 6→11.
  • Your database supports recursive CTEs or Postgres ltree and you want to avoid lft/rgt write amplification entirely — staudenmeir/laravel-adjacency-list is the mainstream option.
  • Writes are frequent (live comment threads, drag-and-drop reordering, collaborative org charts). O(n) write cost, row-lock footprint, and serialization requirements become a production problem you will not staff for.
  • You need SLAs, a CVE response path, or a bus factor above one. With 6 stars and 0 dependents, escalation is internal-only.

Honest read: the package's own signal says legacy-compatibility glue, not a strategic bet. If adopted, pair it with a funded migration plan and do not migrate production data before tree-invariant tests exist in CI.

How to Pitch It (Stakeholders)

For executives: yajra/baum is a small, MIT-licensed utility for storing and querying hierarchical data — categories, menus, org structures — inside a Laravel application. We are not recommending it as a new dependency or a strategic investment. Its ecosystem traction is negligible (a handful of stars, no known downstream consumers) and it is effectively unmaintained, so it carries abandonment risk with no community support and no security-patch pipeline. Recommended position: do not adopt for new work; where it exists in our codebase, treat it as legacy glue to be contained, tested, and eventually replaced with a mainstream alternative such as kalnoy/nestedset. Cost is bounded — the code is small enough to fork and own like an internal library — but that ownership needs a named budget line, not an assumption. No roadmap or headcount impact beyond that contained maintenance cost.

For engineering: yajra/baum is a nested set implementation for Eloquent — lft/rgt/depth/parent_id columns, O(1) ancestor and descendant reads, O(n) writes on insert and move. Its practical value is as the continuing fork of the abandoned etrepat/baum, giving older codebases a migration path. Treat it as a reference implementation, not a supported dependency: expect Composer constraint failures on modern Laravel/PHP, and if it installs, expect runtime breakage on the move/delete paths that Eloquent API drift hits first. If we keep it, vendor it into a private package with explicit framework constraints, wrap all mutations in transactions, serialize concurrent writes per tree, and add invariant checks (no overlapping ranges, depth consistency, scope isolation, soft-delete handling) to CI before touching data. For anything greenfield, use kalnoy/nestedset; if writes dominate, use staudenmeir/laravel-adjacency-list and recursive CTEs instead.

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.
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
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console