codewithdennis/filament-select-tree
BelongsTo, BelongsToMany), making it ideal for applications where hierarchical data is stored in relational databases.getTreeUsing could mitigate this with custom logic).BelongsToMany) may require careful handling of database writes and UI state synchronization.getTreeUsing offers flexibility, non-Eloquent data sources (e.g., API-driven trees) would need manual implementation.parent_id columns, or do they involve polymorphic relationships or custom logic?BelongsToMany, the package handles syncing, but custom logic (e.g., pivot table attributes) may be needed.categories table) to test performance and UX.select or multi-select field with SelectTree in a Filament resource.use CodeWithDennis\FilamentSelectTree\SelectTree;
SelectTree::make('categories')
->relationship('categories', 'name', 'parent_id')
->enableBranchNode()
->searchable();
getTreeUsing for complex cases where relationships don’t fit the package’s assumptions.make() methods in Livewire/Inertia contexts.4.x for Filament 4).titleAttribute/parentAttribute.with('children')) should be optimized.getTreeUsing closure output or the relationship query results.php artisan filament:install).composer require codewithdennis/filament-select-tree:4.x and php artisan filament:assets.parent_id columns).getTreeUsing or Filament’s component hooks if default behavior is insufficient.storeResults() method to inspect tree data during development.whereHas with nested conditions) can be slow. Optimize with indexes or materialized paths.defaultOpenLevel() to limit expanded nodes.modifyQueryUsing).parent_id values or circular references could break the tree. Validate data integrity during migration.defaultOpenLevel() or use getTreeUsing to paginate.HasMany) will fail. Validate relationships before integration.category:updated events).titleAttribute/parentAttribute mapping.getTreeUsing for full control.getTreeUsing closures).parent_id vs. materialized paths).How can I help you explore Laravel packages today?