Download the PHP package saade/filament-adjacency-list without Composer
On this page you can find all versions of the php package saade/filament-adjacency-list. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download saade/filament-adjacency-list
More information about saade/filament-adjacency-list
Files in saade/filament-adjacency-list
Package filament-adjacency-list
Short Description A Filament package to adjacency lists.
License MIT
Homepage https://github.com/saade/filament-adjacency-list
Informations about the package filament-adjacency-list
Filament Adjacency List
A Filament package to manage adjacency lists (aka trees).
Installation
You can install the package via composer:
[!IMPORTANT] If you have not set up a custom theme and are using Filament Panels follow the instructions in the Filament Docs first.
After setting up a custom theme add the plugin's views to your theme css file or your app's css file if using the standalone packages.
Usage
Configuration
Customizing the label key used to display the item's label
Customizing the children key used to gather the item's children.
Note: This is only used when not using relationships.
Customizing the MaxDepth of the tree.
Triggering an action or opening a URL when clicking on an item.
Customizing the item label using a closure.
Creating items without a modal.
Disabling creation, edition, deletion, reordering, moving, and indenting.
Customizing actions
Relationships
In this example, we'll be creating a Ticketing system, where tickets can be assigned to a department, and departments have subjects.
Building the relationship
Now you've created a nested relationship between departments and subjects.
Using the relationship
That's it! Now you're able to manage your adjacency lists using relationships.
Working with Staudenmeir's Laravel Adjacency List
This package also supports Staudenmeir's Laravel Adjacency List package.
First, install the package:
- Use the
HasRecursiveRelationshipstrait in your model, and override the default path separator.
If you're already using the HasRecursiveRelationships trait for other parts of your application, it's probably not a good idea to change your model's path separator, since it can break other parts of your application. Instead, you can add as many path separators as you want:
- Use the
relationshipmethod to define the relationship:
That's it! Now you're able to manage your adjacency lists using relationships.
Customizing the query
Ordering
If your application needs to order the items in the list, you can use the orderColumn method:
Widget
The AdjacencyListWidget can be used to render a tree for any model with a recursive child relationship (including many-to-many graph relationships, using Staudenmeir's HasGraphRelationships trait).
The simplest use case is ...
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Saade
- Ryan Chandler's Navigation Plugin for his work on the tree UI and complex tree actions.
- Hugh for his help on supporting trees/ graphs relationships.
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of filament-adjacency-list with dependencies
filament/filament Version ^4.0|^5.0
illuminate/contracts Version ^11.0|^12.0|^13.0
ryangjchandler/blade-capture-directive Version ^1.0
spatie/laravel-package-tools Version ^1.15.0
staudenmeir/laravel-adjacency-list Version ^1.18