Download the PHP package skyraptor/filament-navigation without Composer
On this page you can find all versions of the php package skyraptor/filament-navigation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download skyraptor/filament-navigation
More information about skyraptor/filament-navigation
Files in skyraptor/filament-navigation
Package filament-navigation
Short Description Build structured navigation menus in Filament.
License MIT
Homepage https://github.com/bumbummen99/filament-navigation
Informations about the package filament-navigation
Filament translateable Navigation
This is a fork of FilamentNavigation extended with translation support.
This plugin for Filament provides a Navigation
resource that allows to build structural navigation menus with ease.
Installation
Begin by installing this package via Composer:
Publish the package's assets:
Usage
The NavigationResource
is automatically registered with Filament so no configuration is required to start using it.
If you wish to customise the navigation group, sort or icon, you can use the respective NavigationResource::navigationGroup()
, NavigationResource::navigationSort()
and NavigationResource::navigationIcon()
methods.
Data structure
Each navigation menu is required to have a name
and handle
. The handle
should be unique and used to retrieve the menu.
Items are stored inside of a JSON column called items
. This is a recursive data structure that looks like:
The recursive structure makes it really simple to render nested menus / dropdowns:
Retrieving a navigation object
To retreive a navigation object, provide the handle to the RyanChandler\FilamentNavigation\Facades\FilamentNavigation::get()
method.
Custom item types
Out of the box, this plugin comes with a single "item type" called "External link". This item type expects a URL to be provided and an optional "target" (same tab or new tab).
It's possible to extend the plugin with custom item types. Custom item types have a name and an array of Filament field objects that will be displayed inside of the "Item" modal.
This API allows you to deeply integrate navigation menus with your application's own entities and models.
All custom fields for the item type can be found inside of the data
property on the item.
The Navigation
field type
This plugin also provides a custom Filament field that can be used to search and select a navigation menu inside other forms and resources.
By default, this field will not be searchable and the value for each option will be the menu id
.
To make the field searchable, call the ->searchable()
method.
If you wish to change the value for each option, call the ->optionValue()
method.
Testing
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
- Ryan Chandler
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of filament-navigation with dependencies
doctrine/dbal Version ^3.3
filament/filament Version ^2.13
illuminate/contracts Version ^9.0
spatie/laravel-package-tools Version ^1.9.2