From c2838a49e7785919fb9c2b7ec880fc40332039c0 Mon Sep 17 00:00:00 2001 From: Francesco Apruzzese Date: Thu, 12 Dec 2024 09:59:40 +0000 Subject: [PATCH] Aggiorna la documentazione e la configurazione del gestore di menu per riflettere il nuovo gruppo di navigazione "CMS" --- README.md | 57 ++++++++++++++++++---------------- config/simple-menu-manager.php | 2 +- 2 files changed, 31 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 69b8a26..9b6096b 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,6 @@ [![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/postare/filament-simple-menu-manager/fix-php-code-styling.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/postare/filament-simple-menu-manager/actions?query=workflow%3A"Fix+PHP+code+styling"+branch%3Amain) [![Total Downloads](https://img.shields.io/packagist/dt/postare/filament-simple-menu-manager.svg?style=flat-square)](https://packagist.org/packages/postare/filament-simple-menu-manager) - - This is where your description should go. Limit it to a paragraph or two. Consider adding a small example. ## Installation @@ -20,46 +18,51 @@ composer require postare/filament-simple-menu-manager You can publish and run the migrations with: ```bash -php artisan vendor:publish --tag="filament-simple-menu-manager-migrations" +php artisan vendor:publish --tag="simple-menu-manager-migrations" php artisan migrate ``` -You can publish the config file with: +Add the plugin to your list in your `AdminPanelProvider` -```bash -php artisan vendor:publish --tag="filament-simple-menu-manager-config" +```php +->plugins([ + Postare\SimpleMenuManager\SimpleMenuManagerPlugin::make(), +]) ``` -Optionally, you can publish the views using +You can publish the config file with: ```bash -php artisan vendor:publish --tag="filament-simple-menu-manager-views" +php artisan vendor:publish --tag="simple-menu-manager-config" ``` This is the contents of the published config file: ```php +use Postare\SimpleMenuManager\Filament\Resources\MenuResource\MenuTypeHandlers; + return [ + // Resource configuration + 'navigation_group' => 'CMS', + 'navigation_sort' => 1, + 'model_label' => 'Menu', + 'plural_model_label' => 'Menu', + + // Menu Model + 'model' => Postare\SimpleMenuManager\Models\Menu::class, + + /** + * Menu Type Handlers + * Add your custom menu type handlers here. + * */ + 'handlers' => [ + 'link' => MenuTypeHandlers\LinkType::class, + 'page' => MenuTypeHandlers\PageType::class, + 'placeholder' => MenuTypeHandlers\PlaceholderType::class, + ], ]; ``` -## Usage - -```php -$simpleMenuManager = new Postare\SimpleMenuManager(); -echo $simpleMenuManager->echoPhrase('Hello, Postare!'); -``` - -## Testing - -```bash -composer test -``` - -## Changelog - -Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. - ## Contributing Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details. @@ -70,8 +73,8 @@ Please review [our security policy](../../security/policy) on how to report secu ## Credits -- [Francesco Apruzzese](https://github.com/postare) -- [All Contributors](../../contributors) +- [Francesco Apruzzese](https://github.com/postare) +- [All Contributors](../../contributors) ## License diff --git a/config/simple-menu-manager.php b/config/simple-menu-manager.php index b280c07..98b6a64 100644 --- a/config/simple-menu-manager.php +++ b/config/simple-menu-manager.php @@ -4,7 +4,7 @@ return [ // Resource configuration - 'navigation_group' => 'Portale', + 'navigation_group' => 'CMS', 'navigation_sort' => 1, 'model_label' => 'Menu', 'plural_model_label' => 'Menu',