sirgrimorum/automenu

Smart menu form Laravel 5.6

1.2.27 2021-02-25 11:32 UTC

README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Easy Menu builder for Laravel using Bootstrap framework.

Install

Via Composer

$ composer require sirgrimorum/automenu

Then publish de configuration files for the auto generated menus:

First the configuration file (general configuration for a menu)

$ php artisan vendor:publish --tag=config

Then the lang file (especific localizable configuration for a menu)

$ php artisan vendor:publish --tag=lang

Optionally, you can publish the blade views that generate the menus if needed to be changed (not recommended)

$ php artisan vendor:publish --tag=views

Usage

In a blade layout use

{!! AutoMenu::buildAutoMenu()!!}

or the blade directive

@load_automenu()

This will use the default parameters, givin the menu an id of "menu" and using the configurations in app/config/sirgrimorum/automenu.php and resources/lang/vendor/automenu/en/automenu.php

To use a diferent configuration, create a copy of the two configuration files and follow the instructions and give the call strings (the same for the config() and trans() commands) in the second and third parameters of the function call

AutoMenu::buildAutoMenu("menu_id","menus.new_config","menu_new_lang");

Change log

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email andres.espinosa@grimorum.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.