energon7 / nova-menu-builder
Advanced Menu Builder Tool for Laravel Nova.
Installs: 1 156
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 2
Open Issues: 7
Language:Vue
Requires
- php: >=7.1.0
- spatie/laravel-translatable: >=3.1
- dev-master
- v3.x-dev
- v2.1.1
- v2.1.0
- v2.0.6
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.2
- v2.0.1
- v2.0.0
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.0
- dev-dependabot/npm_and_yarn/json5-and-laravel-mix-2.2.3
- dev-dependabot/npm_and_yarn/scss-tokenizer-and-node-sass-0.4.3
- dev-dependabot/npm_and_yarn/minimist-and-mkdirp-1.2.8
- dev-dependabot/npm_and_yarn/loader-utils-1.4.2
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/minimatch-3.0.8
This package is auto-updated.
Last update: 2024-12-30 02:39:20 UTC
README
#Advanced Nova Menu Builder
This package forked from Nova Menu Builder
!!! ####This package work only with Spatie Translatable
Fixes :
- fix child class (now child class assign to child - ul )
- fix too many requests to database
- fix enabling/disabling sub menu
Updates :
- added compatibility with Spatie Translatable package.
- added dynamic language selector from database
This tool allows you to create menus in Laravel Nova
Installation
You can install the package in to a Laravel app that uses Nova via composer:
composer require energon7/nova-menu-builder
Then you should publish the service provider, migrate database:
php artisan vendor:publish --provider="Energon7\MenuBuilder\MenuBuilderServiceProvider"
php artisan migrate
Then create your own table "languages"
Usage
Next up, you must register the tool with Nova. This is typically done in the tools method of the NovaServiceProvider.
// in app/Providers/NovaServiceProvider.php // ... public function tools() { return [ // ... new \Energon7\MenuBuilder\MenuBuilder(), ]; }
Helpers
There are two helpers built in for your blades
-
menu_builder('slug').
Creates an html menu for given slug. Extra options are not required. By default tags are
ul
andli
, and without html classes.
{!! menu_builder('main') !!} //or {!! menu_builder('main', 'parent-class', 'child-class',with children(boolean) , with active/deactive(boolean), 'dl', 'dd') !!} booleans default is true
-
menu_json('slug').
Returns a json with all items for given slug.
{!! menu_json('main') !!}
Localization
Set your translations in the corresponding xx.json file located in /resources/lang/vendor/nova
"Menu Builder": "Menu Builder", "Menu Items": "Menu Items", "Add item": "Add item", "Delete item": "Delete item", "Are you sure to delete this menu item?": "Are you sure to delete this menu item?", "Take care. All children items will be deleted cause you're deleting the parent.": "Take care. All children items will be deleted cause you're deleting the parent.", "Cancel": "Cancel", "Yes, remove!": "Yes, remove!", "Add Menu item": "Add Menu item", "Name": "Name", "Slug": "Slug", "Menu Helper": "Menu Helper", "Link type": "Link type", "Choose an option": "Choose an option", "Static Url": "Static Url", "Dynamic Route": "Dynamic Route", "URL": "URL", "Route": "Route", "Parameters": "Parameters", "Open in": "Open in", "Same window": "Same window", "New window": "New window", "Classes": "Classes", "Create menu item": "Create menu item", "Update menu item": "Update menu item", "Item removed successfully!": "Item removed successfully!", "Item created!": "Item created!", "Item updated!": "Item updated!", "Menu reordered!": "Menu reordered!", "Error on server!": "Error on server!", "Enabled": "Enabled", "Disabled": "Disabled"
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email energon7777@gmail.com instead of using the issue tracker.
Postcardware
You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.
License
The MIT License (MIT). Please see License File for more information.