Download the PHP package bumbummen99/bs4menu without Composer
On this page you can find all versions of the php package bumbummen99/bs4menu. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bumbummen99/bs4menu
More information about bumbummen99/bs4menu
Files in bumbummen99/bs4menu
Package bs4menu
Short Description Dynamic menu builder for Bootstrap 4.
License MIT
Informations about the package bs4menu
Menu Builder

Simple dynamic menu building system.
PHP framework agnostic. The default renderer uses Bootstrap 3 class names and markup.
Installation
composer require anlutro/menu
- pick the latest tag visible in the github tag list or on packagist.
Laravel 4
Add bs4menu\ServiceProvider
to the list of providers in app/config/app.php. Optionally, add an alias for 'Menu' => 'bs4menu\Facade'
as well. The menu builder instance can be accessed via the facade or via automatic dependency injection by type hinting.
Do artisan config:publish anlutro/menu
to change the default Bootstrap 3-specific settings.
Usage
Set up a shared instance of Menu\Builder. Create the menus you need.
If you're using Laravel 4, you can use Menu::
instead of $builder->
provided you set up an alias as shown in the installation instructions above.
From here, you can add items to your menus from anywhere.
Adding submenus works similarly.
When you want to render a menu, call render($menu) and echo it.
By default, Bootstrap 3-specific classes are used. If you want to use something else, you need to create your own class implementation of bs4menu\Renderers\RendererInterface
and either do $builder->setDefaultRenderer('MyRenderer')
or $builder->render('name_of_menu', $myRenderer)
.
Contact
Open an issue on GitHub if you have any problems or suggestions.
License
The contents of this repository is released under the MIT license.