lavalite/menu

Menu package for lavalite framework

Installs: 891

Dependents: 1

Watches: 3

Open Issues: 1

Language: PHP

2.3.1 2015-01-27 11:46 UTC

README

This is a Laravel 4 package that provides menu interface for lavalite framework.

Begin by installing this package through Composer. Edit your project's composer.json file to require lavalite/menu.

"lavalite/menu": "dev-master"

Next, update Composer from the Terminal:

composer update

Once this operation completes, the final step is to add the service provider and menu alias. Open app/config/app.php, and add a new item to the providers array.

'Lavalite\Menu\MenuServiceProvider'

And also add it to alias

'Menu'  => 'Lavalite\Menu\Facades\Menu',

The last thing to do is to migrate to create the pages table:

php artisan migrate --package="lavalite/menu"

Publishing Configuration file

php artisan config:publish lavalite/menu

You are done!

Usage

On the view page Just call

{{Menu::menu('key-of-the-root-menu')}}

Menu Configuration

'menues'  => array (
             'admin' => array (
                        'renderer'     => 'Lavalite\Menu\Renderer\BootstrapMenuRenderer',
                        'attributes'   => array('id' => 'admin-menu')
                        ),
             )

Implimentation

admin = key-of-the-root-menu

Available renderers

Lavalite\Menu\Renderer\BootstrapMenuRenderer
Lavalite\Menu\Renderer\ListMenuRenderer
Lavalite\Menu\Renderer\DropdownMenuRenderer

Attributes can be any html attributes which is to be added to the root <ul> element.