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

Filament Tree View Laravel Package

openplain/filament-tree-view

A drag-and-drop tree view component for Filament resources that makes managing hierarchical data feel native, with depth control, auto or batch save modes, custom fields, actions, dark mode, and accessible keyboard navigation.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • The package is built the way Filament developers expect: a Tree builder object that mirrors the Table builder, TreePage extending the standard resource page, and TreeRelationPage for ManageRelatedRecords sub-pages. It composes Filament's own Field and Action primitives (TextField, IconField, EditAction, DeleteAction) rather than introducing a parallel abstraction layer. For a Filament shop this is the lowest-friction shape a third-party component can take.
  • Data layer is an adjacency list (parent_id + order) via staudenmeir/laravel-adjacency-list, a mature package with broad production usage. This is the right choice over nested sets for a CRUD admin: cheap inserts and moves, at the cost of recursive read queries.
  • UI layer is Atlassian's Pragmatic Drag & Drop, which carries real accessibility work (keyboard navigation, screen reader support) we would otherwise have to build and certify ourselves. That matters if we have WCAG obligations.
  • The design is additive: tree() sits alongside form() and table() on the resource. Nothing existing is replaced unless we choose to swap the index page.

Integration feasibility

  • Installation is two commands plus an asset publish step; the plugin self-registers CSS/JS with Filament. No service provider wiring, no config file to own.
  • Schema change is limited to two columns on tables we want to tree-ify. For greenfield tables this is trivial. For existing tables we need a migration plus a backfill (parent_id = null, order assigned) and a decision on whether order is unique-per-parent or global.
  • Model opt-in is a single trait, with overridable column names for legacy schemas. That's a clean seam for a partial rollout.
  • Main feasibility gate is version coupling, not effort: Filament 4.x/5.x only. Any resource we want to tree-ify must live in a panel already on Filament 4+. That is the real cost driver and should be confirmed before any estimation.

Technical risk

  • Adoption risk is the dominant risk. 41 stars, 0 dependents, small org namespace, no visible CI or coverage badge in the supplied materials. We would be among the first production users. The maturity signal is "readme, changelog, releases" — documentation is genuinely good, but that is not the same as a tested, battle-worn component.
  • Destructive default: the HasTreeStructure trait provides "automatic cascade delete for descendants." This is model-level, so it applies to every deletion path in the application — admin panel, API, queue jobs, tinker — not just the tree page. A mistaken delete silently removes an entire subtree. The README's DeleteAction example surfaces descendant counts in a modal, but that is opt-in developer configuration, not a package guarantee. We must verify whether the cascade is implemented as a DB-level self-referencing FK cascade, an Eloquent event, or both, and whether it can be disabled.
  • Filament major coupling: claiming support for Filament 5.x (a very recent major) means the package tracks Filament internals closely. Minor Filament releases can break it, and our upgrade cadence becomes dependent on a single-maintainer package.
  • Concurrency: no mention of optimistic locking or version columns. Two admins reordering the same subtree in manual-save mode is a last-write-wins scenario with plausible order/parent_id corruption.
  • Circular reference prevention is advertised, but the docs don't state whether validation is server-side authoritative or client-side only. A crafted Livewire request is the test that matters.

Key questions

  • Is cascade delete implemented at the DB, model-event, or query level — and can it be disabled per model?
  • Does manual save wrap a reorder in a single transaction, and is there any conflict detection?
  • Is circular-reference prevention enforced server-side on every move, or only in the UI?
  • Does the tree paginate or virtualize nodes, or render the full result set into the DOM?
  • Is there a test suite, and what is CI coverage across the Filament 4 and 5 matrices?
  • Who maintains it, and what is the stated policy for Filament major upgrades?

Integration Approach

Stack fit

Requires PHP 8.2+, Laravel 11/12, Filament 4/5. This is a clean fit for new panels and a hard blocker for any panel still on Filament 3. Because Filament is Livewire-based, the drag-and-drop component runs over the existing Livewire request cycle — no new JS build step, no separate SPA surface, no additional runtime infrastructure. Operationally it is the same deploy artifact.

Migration path

  1. Confirm the target panel is on Filament 4+; if not, scope the Filament upgrade as a separate prerequisite project and do not bundle it.
  2. Add parent_id (nullable, self-referencing FK) and order (integer, default 0) via migration; backfill existing rows as roots with sequential order.
  3. Add the trait to one low-blast-radius model first — a taxonomy like categories or a menu structure, not a core business entity.
  4. Keep the existing ListRecords index page intact and expose the tree at a separate route (/tree) during the pilot. This gives us a side-by-side comparison and a zero-risk rollback.
  5. Only after validation, promote TreePage to index and retire the flat table for that resource.

Compatibility

  • Column-name overrides (getParentKeyName, getLocalKeyName) cover legacy schemas without renaming columns — useful for inherited databases.
  • UUID primary keys are documented as supported.
  • Watch the order column semantics: if any existing code sorts children by a different field, the tree view and that code will disagree.

Sequencing

Schema and trait (0.5 day) → single resource tree page behind a separate route (1–2 days) → validation of save semantics, cascade behavior, and circular-move rejection (1 day) → feature-flagged rollout to remaining hierarchical models (1–2 days each) → optional promotion to index. Budget a half-day spike up front purely to answer the key questions above; the answers materially change the risk posture.

Operational Impact

Maintenance

  • Small surface area, MIT licensed, so forking or vendoring is a realistic contingency — the code we'd need to own is the Tree builder, the field classes, and the page wrappers.
  • Pin the version explicitly and require a changelog review before any Filament upgrade. Treat "does Filament 5.x still work" as a standing item in our upgrade runbook.
  • The dependency on staudenmeir/laravel-adjacency-list is benign — it is more established than the package itself and is the more likely component to survive.

Support

  • No commercial support; GitHub issues only, with a small community and therefore weak signal on responsiveness. If this becomes load-bearing for an admin workflow, assign an internal owner and budget for occasional self-service fixes.
  • Documentation quality is above average for a package this size — the quick start, the defaults table, and the "common patterns" section are genuinely sufficient for a mid-level Filament developer to self-serve.

Scaling

  • Adjacency-list reads require recursive queries; the depth attribute is computed at query time and not stored. On trees in the low thousands this is fine; on larger trees it needs caching or a materialized path.
  • The more immediate scaling limit is rendering: there is no documented pagination or virtualization, so a fully expanded large tree will produce a heavy DOM and slow Livewire responses. Use collapsed() and a bounded maxDepth() on anything beyond a few hundred nodes.
  • Auto-save issues a write per drag. Manual save is the safer default for large trees and for any hierarchy where order matters downstream.

Failure modes

  • Accidental mass deletion via cascade — mitigated only by configuring a descendant-aware DeleteAction modal and by restricting the trait to models where subtree deletion is genuinely intended.
  • Concurrent reorders by two admins producing inconsistent parent_id/order state, with no conflict detection.
  • Orphaned nodes if rows are deleted or reparented outside the application.
  • Duplicate or colliding order values after bulk imports that bypass the package.
  • Lowering maxDepth() after data exists, leaving deeper nodes unreachable or unrenderable.
  • Forgotten php artisan filament:assets on deploy — the failure is silent and the symptom is a broken or unstyled drag surface, which is easy to misdiagnose.
  • Filament minor upgrade breaking the component mid-sprint; contain this by pinning and testing the tree page as part of any panel upgrade.

Ramp-up

  • Developer ramp-up is genuinely low: anyone fluent in Filament Tables will be productive in an afternoon, because the API is deliberately isomorphic.
  • The training that actually matters is behavioral, not syntactic: QA and admins must understand manual versus auto-save semantics, that collapse state affects perceived performance, and that deleting a parent node removes children. Put those three facts in the release notes, not just the docs.
  • Reserve real effort for the first schema migration and backfill on any legacy table — that, not the component itself, is where the schedule risk sits.

Verdict: Reasonable adopt for a Filament 4+ panel needing hierarchical admin data, piloted on one non-critical taxonomy with cascade delete explicitly reviewed. Not appropriate for Filament 3 shops, and not appropriate for a core business hierarchy until the cascade and concurrency questions are answered.

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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package