Download the PHP package datlechin/filament-menu-builder without Composer
On this page you can find all versions of the php package datlechin/filament-menu-builder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download datlechin/filament-menu-builder
More information about datlechin/filament-menu-builder
Files in datlechin/filament-menu-builder
Package filament-menu-builder
Short Description Create and manage menus and menu items
License MIT
Homepage https://github.com/datlechin/filament-menu-builder
Informations about the package filament-menu-builder
Filament Menu Builder

A Filament plugin for building menus with drag-and-drop ordering, nesting, custom links, and dynamic panels.
Requirements
- PHP 8.3+
- Filament 5.0+
- Laravel 12+
Upgrading
From v0.7.x (Filament v3) to v1.x (Filament v5)
-
Update your
composer.json: - Publish and run the new migration to add the
panel,icon, andclassescolumns:
The upgrade migration checks for existing columns before adding them, so it's safe on fresh installs too.
- Re-publish the config file if you published it previously:
Installation
Install via Composer:
Publish and run the migrations:
Optionally, publish the config file:
Or use the install command:
You will need to set up a Filament custom theme
If you don't yet have a custom theme, run the following command:
Next, open up the theme.css file for the custom theme and add the following line:
Usage
Register the plugin in your panel provider:
Locations
Locations define where menus appear in your application:
Menu Panels
Panels provide item sources for menus, either from Eloquent models or static lists.
Model Panel
Implement MenuPanelable on your model:
Then register it:
Static Panel
add() also accepts target, icon, and classes:
Custom Link & Custom Text Panels
The custom link panel is shown by default. The custom text panel (for non-link items like headings) is opt-in:
Custom Fields
Add extra fields to the menu or menu item forms:
Singular methods work too:
Multiple calls are merged, so fields registered from different service providers won't overwrite each other.
Customizing Navigation
Indent / Unindent
Nesting via indent/unindent actions is enabled by default:
Translatable Menus
Built-in multilingual support with no extra packages required. Translatable fields are stored as JSON with locale tabs in the form UI.
Setup
-
Enable translatable with your locales:
- Publish and run the migration to convert columns from
stringtojson:
Existing string data is wrapped in the default locale (en). Edit $defaultLocale in the published migration to change this.
Configuring Translatable Fields
Only MenuItem.title is translatable by default:
Rendering Translated Titles
Use resolveLocale() in Blade to display titles in the current locale:
resolveLocale() returns the translation for app()->getLocale(), falls back to the first available translation, or returns the raw string for non-translatable setups.
Spatie Translatable Compatibility
The JSON format is compatible with Spatie Laravel Translatable. If you add HasTranslations to a custom model, the plugin detects it and defers to Spatie's mutators.
Custom Models
Replace the default models with your own:
Rendering Menus
Retrieve a menu by location. Results are cached and automatically busted on changes:
Render menu items:
Active State Detection
Check if a menu item matches the current URL:
MenuItem Properties
| Property | Type | Description |
|---|---|---|
title |
string|array | The display title (array when translatable) |
url |
?string | The URL (null for text-only items) |
target |
string | Link target (_self, _blank, etc.) |
icon |
?string | Icon identifier (e.g. heroicon-o-home) |
classes |
?string | CSS classes for the item |
rel |
?string | Link rel attribute (e.g. nofollow noopener) |
type |
string | Panel name / source type (accessor) |
children |
Collection | Nested child items |
Testing
Changelog
See CHANGELOG for recent changes.
License
MIT License. See LICENSE.md.