doriiaan / filament-translatable-menu-builder
Create and manage translatable menus and menu items. Fork of datlechin/filament-menu-builder.
Requires
- php: ^8.1
- astrotomic/laravel-translatable: ^11.16
- cactus-galaxy/filament-astrotomic: ^0.4.0
- filament/filament: ^3.0
- spatie/laravel-package-tools: ^1.15.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.1
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
README
This Filament package allows you to create and manage translatable menus in your Filament application.
This package is a fork from datlechin/filament-menu-builder and integrates Astrotomic/laravel-translatable for translations with CactusGalaxy/FilamentAstrotomic for translations tabs.
Installation
You can install the package via composer:
composer require doriiaan/filament-translatable-menu-builder
You need to publish the migrations and run them:
php artisan vendor:publish --tag="filament-translatable-menu-builder-migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --tag="filament-translatable-menu-builder-config"
Optionally, if you want to customize the views, you can publish them with:
php artisan vendor:publish --tag="filament-translatable-menu-builder-views"
This is the contents of the published config file:
return [ 'tables' => [ 'menus' => 'menus', 'menu_tarnslations' => 'menu_translations', 'menu_items' => 'menu_items', ], ];
Add the plugin to AdminPanelProvider
:
use Doriiaan\FilamentTranslatableMenuBuilder\FilamentTranslatableMenuBuilderPlugin; $panel ... ->plugin(FilamentTranslatableMenuBuilderPlugin::make())
Usage
If one day someone uses this package, I could fill in this section and make the package as customizable as: datlechin/filament-menu-builder.
Custom links don't work.
License
The MIT License (MIT). Please see License File for more information.