Download the PHP package kalnoy/illuminate-menu without Composer
On this page you can find all versions of the php package kalnoy/illuminate-menu. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package illuminate-menu
Laravel Menu Builder
A menu builder for Laravel 4-5 using Bootstrap's markup.
Документация на Русском
Note that this package is shipped with no styles nor scripts, you have to download them manually from Twitter Bootstrap's site.
Installation
Install using Composer:
Add a service provider:
And a facade:
Documentation
Rendering a menu:
Where $attributes
is optional array of html attributes for ul
element.
Rendering a list of menu items:
Rendering a single menu item:
See a list of available options below.
Basic example:
Rendering an item with a drop down menu:
Controlling whether the item is visible:
Item options
You can specify an array of following options:
label
is a label of the item, automatically translated, so you can specify lang string idurl
is the url which can be a full URI or local pathroute
to specify a route, possibly with parameterssecure
; specifytrue
to makeurl
be secure (doesn't affectroute
option)items
is an array of items for drop down menulinkOptions
is an array of additional link attributes
Changing the state of the item:
visible
is a boolean value or closure to specify whether the item is visibleactive
is a boolean value or closure to specify whether to addactive
class to item; if not specified, determined automatically based on current urldisabled
is a boolean value or closure to specify whether the menu item is disabled
Presentation options:
icon
is a glyphicon id, i.e.pencil
badge
is a value for badge (scalar or closure)- and any other parameter that will be rendered as an attribute for
<li>
element.
Customization
Though this menu builder intended to be used together with bootstrap markup, you can customize it however you like by
extending Illuminate\Html\MenuBuilder
class and overriding base methods.