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 Nested Set Table Laravel Package

pjedesigns/filament-nested-set-table

A Filament table package for Laravel nested set models, making hierarchical records easy to browse and manage in your admin panel with a clean, tree-structured table UI.

View on GitHub
Deep Wiki
Context7

Getting Started

This release is the first one with a usable "focused" reorder experience, so start there rather than wiring the reorder UI into your own resource.

  1. Install and publish config/migrations (still required — the tree column and depth metadata are in the migration):
    composer require <vendor>/<package>
    php artisan vendor:publish --tag="<package>-migrations"
    php artisan migrate
    
  2. Add the tree trait/interface to the model you want to reorder (e.g. Category) and make sure parent_id, _lft, _rgt, depth (or whatever the package names them) exist.
  3. Register the new OrderPage as a Filament page in your panel provider. This is the headline feature of v1.1.0 — you no longer need to bolt drag-and-drop onto a resource table.
  4. Open the OrderPage and drag a node. Confirm the sibling order persists after refresh, then hit Fix Tree and confirm it's a no-op on a healthy tree.

First real use case: a category/menu/org-chart model where editors need to reorganise hierarchy without touching IDs or parent dropdowns. Point them at OrderPage, keep the normal list page for CRUD.

Look first at the README's OrderPage section (updated in this release) and the translation keys file — the UI strings are now externalised, so you can reword the header buttons without forking.

Implementation Patterns

Dedicated OrderPage as the reorder surface. Keep your ListRecords page for search/filter/bulk actions and route power users to OrderPage for structural work. This separation is the main architectural improvement here — the drag-clone fix means the page can now render a full table layout while dragging, so you can keep column alignment consistent between the two views.

Header button workflow. v1.1.0 ships Expand All, Collapse All, Fix Tree, and Back to List. Treat them as the intended editor loop:

  • Expand/Collapse for navigating deep trees without losing context
  • Fix Tree as a recovery action after failed moves or manual DB edits
  • Back to List to return to filtered CRUD

If you're registering the page yourself, verify all four actions are wired; if the package exposes them via a page class method, you can selectively hide Fix Tree from non-admins.

Undo via Filament notifications. The undo action is now surfaced through Filament's notification system rather than a bespoke toast. That means:

  • Undo lifetimes follow your notification duration config — short notification durations make undo effectively useless. Raise ->duration() or the panel's notification timeout for OrderPage if editors do bulk drags.
  • If you've customised Filament notifications (custom view, queued notifications), test that the undo action still renders — this is the most likely integration break.

Max-depth-aware descriptions. The conditional description text keyed off max_depth means you can raise the depth limit and the UI copy adapts. Keep the config value as the single source of truth; don't hardcode depth limits in your own form hints.

Locale coverage. New translation keys ship for the OrderPage UI. If you publish translations, republish or diff them — missing keys fall back to English, but a partial lang/vendor/... directory will show mixed-language headers.

Gotchas and Tips

  • Undo is notification-scoped, not transactional. It reverses the last move, not the last N moves. Don't advertise it to users as a general history feature.
  • Fix Tree mutates data. It recalculates left/right bounds. Run it in a transaction in production and take a backup the first time — a bad parent_id reference can silently reparent nodes.
  • The drag clone fix is cosmetic but load-bearing. Prior versions dropped cell structure on drag, which made it easy to mis-drop. If you were hiding columns to work around that, you can stop.
  • Border colour fix aligns with Filament's theme. If you have a custom panel theme with overridden CSS variables, re-check contrast on the OrderPage rows — the package now inherits Filament colours rather than hardcoding them.
  • max_depth config affects both validation and copy. Changing it changes the description text, so screenshots in your internal docs may go stale.
  • Back to List needs a resolvable list page URL. In multi-panel apps, confirm it returns to the correct panel's list page, not the default panel's.
  • Debugging stuck reordering: check _lft/_rgt integrity with a scoped query before blaming the UI — a corrupted tree makes drag operations appear to succeed but not persist.
  • Extension points: the OrderPage is a standard Filament page, so override getHeaderActions(), table columns, and the query in a subclass rather than editing vendor files. Custom table actions added to OrderPage will appear alongside the new header buttons, not inside them.
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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource