Weave Code
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

Filament Tree View Laravel Package

openplain/filament-tree-view

Drag-and-drop tree view for Filament resources to manage hierarchical data. Built on Laravel Adjacency List and Atlassian Pragmatic Drag & Drop. Supports depth limits, auto or batch save, custom fields, actions, dark mode, accessibility, and safe moves.

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Filament Tree View
How do I replace a Filament Table with this Tree View for hierarchical data?
Replace your `Table` with `TreeView::make()` in your Filament resource. The API mirrors Filament’s Table, so you’ll use familiar methods like `column()`, `action()`, and `header()`. For example, swap `Table::make()` for `TreeView::make('Category')` in your resource class. The package handles the rest, including drag-and-drop and hierarchical rendering.
Does this package work with Laravel models using UUIDs or string primary keys?
Yes, this package explicitly supports non-integer primary keys like UUIDs or strings. No schema changes are required—just ensure your `TreeView` configuration declares the primary key type (e.g., `TreeView::make('Category', ['primaryKey' => 'uuid'])`). The latest release fixes edge cases for non-integer comparisons during drag-and-drop operations.
Can I use this for nested categories, tags, or organizational charts in Filament?
Absolutely. This package is designed for hierarchical data like categories, tags, or org charts. It leverages Laravel Adjacency List for recursive relationships, so it handles deep nesting efficiently. You can also set depth limits to control how many levels users can see or edit, preventing overly complex structures.
Will drag-and-drop operations work inside Filament modals?
Yes, but with a recent fix for modal rehydration. If you’re using modal-based workflows (e.g., editing a node in a modal), the package now preserves mounted actions during Livewire modal rehydration. Test your modal interactions to confirm the fix resolves any action loss during drag-and-drop operations.
How does auto-save vs. batch save work, and which should I choose?
Auto-save updates the hierarchy immediately after each drag-and-drop, providing real-time feedback. Batch save collects all changes and lets users confirm them at once, reducing database writes. Choose auto-save for frequent, low-risk edits (e.g., small teams) or batch save for critical hierarchies where you want to review changes before saving.
Is this compatible with Filament 5.x and Laravel 12?
Yes, this package supports Filament 4.x and 5.x, as well as Laravel 11 and 12. There are no breaking changes for Filament 5.x migrations, and the package follows Filament’s component conventions. Always check the [release notes](https://github.com/openplain/filament-tree-view/releases) for version-specific updates.
Can I customize the appearance of tree nodes (e.g., icons, colors, or fields)?
Yes, you can customize nodes using Filament’s field system. Add fields like `TextField`, `IconField`, or `BadgeField` to display custom data. For styling, use Filament’s theming system (e.g., CSS variables or Tailwind classes) to match your app’s design. The package also supports dark mode out of the box.
What happens if a user tries to create a circular reference in the tree?
The package includes safety checks to prevent circular references. If a user attempts to create a loop (e.g., making a parent its own child), the operation is blocked with a clear error message. This is handled at the database level using Laravel Adjacency List’s built-in validation.
Are there performance concerns with large hierarchies (e.g., thousands of nodes)?
Performance depends on your database and hierarchy depth. Adjacency lists can become slow with very wide or deep trees (e.g., >5 levels). For large datasets, consider denormalizing data or using a nested set pattern. The package itself doesn’t introduce new performance risks, but test with your specific data volume.
What alternatives exist for hierarchical data in Filament, and why choose this one?
Alternatives include custom Livewire components or packages like `spatie/laravel-medialibrary` (for nested media). This package stands out because it’s a **drop-in Filament replacement** with drag-and-drop, accessibility, and dark mode built-in. Unlike generic solutions, it integrates seamlessly with Filament’s ecosystem (actions, modals, theming) and uses proven libraries like Atlassian’s Pragmatic Drag & Drop.
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.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope