novius/filament-relation-nested
Filament package to manage Eloquent relations backed by kalnoy/nestedset. Adds a TreeRelationManager for nested tree CRUD in your admin panel, with optional actions like FixTree to repair the nested set structure. Compatible with Laravel 11, Filament 5, PHP 8.2+.
kalnoy/nestedset package. It extends Filament’s native relation managers to support tree-like structures, reducing custom UI/UX development.TreeColumn, FixTreeAction). Aligns with Filament’s declarative resource-based architecture.TreeRelationManager subclass for nested relations.TreeColumn in tables for visual hierarchy.TreeRelationManager methods (e.g., configureTable).TreeColumn appearance (e.g., indentation, icons)._lft/_rgt queries).FixTreeAction or manual locking.)nestedset queries.spatie/laravel-medialibrary (for simpler hierarchies).kalnoy/nestedset implementation (no migration needed).nestedset models for compatibility (e.g., _lft/_rgt columns).composer require novius/filament-relation-nested
php artisan filament:assets
RelationManager with TreeRelationManager for nested relations.TreeColumn to tables for visual hierarchy.FixTreeAction for corrupted trees (if applicable).TreeRelationManager::configureTable() for custom columns/actions.TreeColumn via traits or subclasses.Menu::with('items')->get()).FixTreeAction usage._lft/_rgt (O(1) for depth/parent queries).TreeColumn optimizations).with() to eager-load relations.TreeColumn._lft/_rgt columns add minimal overhead.| Scenario | Impact | Mitigation |
|---|---|---|
| Corrupted tree structure | Broken hierarchy, UI errors | Use FixTreeAction or manual SQL fixes. |
| Concurrent edits | Race conditions in tree rebalancing | Implement optimistic locking. |
| Filament/NestedSet updates | Package incompatibility | Fork and maintain locally. |
| Large trees (>1000 nodes) | Slow queries/UI | Add indexes, lazy-load, or paginate. |
| AGPL license conflicts | Legal/compliance issues | Review with legal team; consider alternatives. |
_lft/_rgt mechanics.TreeRelationManager for a test resource.TreeColumn to match UI design.FixTreeAction for custom validation.How can I help you explore Laravel packages today?