PHPackages                             llama-laravel/menus - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. llama-laravel/menus

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

llama-laravel/menus
===================

A quick way to create menus in Laravel 5

v0.1.0(9y ago)117MITPHPPHP &gt;=5.6.4

Since May 24Pushed 9y ago1 watchersCompare

[ Source](https://github.com/xuanhoa88/laravel-menus)[ Packagist](https://packagist.org/packages/llama-laravel/menus)[ Docs](https://github.com/xuanhoa88/laravel-menus)[ RSS](/packages/llama-laravel-menus/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (3)Used By (0)

Laravel Menu
============

[](#laravel-menu)

[![Latest Stable Version](https://camo.githubusercontent.com/32a49996b9d7c0b8fa7dc290c9e843489cbb59dfc78f67190e62d4496ca16a46/68747470733a2f2f706f7365722e707567782e6f72672f6c6c616d612d6c61726176656c2f6d656e75732f762f737461626c652e737667)](https://packagist.org/packages/llama-laravel/menus)[![Latest Unstable Version](https://camo.githubusercontent.com/a1566209112b47abf9fb7d9d9dc863f13c4fea5c8eed4fd8a806cf949faff76d/68747470733a2f2f706f7365722e707567782e6f72672f6c6c616d612d6c61726176656c2f6d656e75732f762f756e737461626c652e737667)](https://packagist.org/packages/llama-laravel/menus)[![Total Downloads](https://camo.githubusercontent.com/e4a5fc3f1c25c51251b7b766ce764699418f35b4a0af1e2fa973bfb392b0cc84/68747470733a2f2f706f7365722e707567782e6f72672f6c6c616d612d6c61726176656c2f6d656e75732f646f776e6c6f6164732e737667)](https://packagist.org/packages/llama-laravel/menus)[![License](https://camo.githubusercontent.com/1e8c6696a9ac8767d370441a16c5c5dedcfcde8ddd8cae72c6179b2f37d5f3d1/68747470733a2f2f706f7365722e707567782e6f72672f6c6c616d612d6c61726176656c2f6d656e75732f6c6963656e73652e737667)](https://packagist.org/packages/llama-laravel/menus)

A quick and easy way to create menus in [Laravel 5](http://laravel.com/)

Documentation
-------------

[](#documentation)

- [Installation](#installation)
- [Getting Started](#getting-started)
- [Routing](#routing)
    - [URLs](#urls)
    - [Named Routes](#named-routes)
    - [Controller Actions](#controller-actions)
    - [HTTPS](#https)
- [Sub-items](#sub-items)
- [Set Item's ID Manualy](#)
- [Set Item's Nicknames Manualy](#)
- [Referring to Items](#referring-to-items)
    - [Get Item by Title](#get-item-by-title)
    - [Get Item by Id](#get-item-by-id)
    - [Get All Items](#get-all-items)
    - [Get the First Item](#get-the-first-item)
    - [Get the Last Item](#get-the-last-item)
    - [Get Sub-items of the Item](#get-sub-items-of-the-item)
    - [Magic Where Methods](#magic-where-methods)
- [Referring to Menu Objects](#referring-to-menu-instances)
- [HTML Attributes](#html-attributes)
- [Manipulating Links](#manipulating-links)
    - [Link's Href Property](#links-href-property)
- [Active Item](#active-item)
    - [RESTful URLs](#restful-urls)
    - [URL Wildcards](#url-wildcards)
- [Inserting a Separator](#inserting-a-separator)
- [Append and Prepend](#append-and-prepend)
- [Raw Items](#raw-items)
- [Menu Groups](#menu-groups)
- [URL Prefixing](#url-prefixing)
- [Nested Groups](#nested-groups)
- [Meta Data](#meta-data)
- [Filtering the Items](#filtering-the-items)
- [Sorting the Items](#sorting-the-items)
- [Rendering Methods](#rendering-methods)
    - [Menu as Unordered List](#menu-as-unordered-list)
    - [Menu as Ordered List](#menu-as-ordered-list)
    - [Menu as Div](#menu-as-div)
    - [Menu as Bootstrap 3 Navbar](#menu-as-bootstrap-3-navbar)
- [Advanced Usage](#advanced-usage)
    - [A Basic Example](#a-basic-example)
- [Configuration](#configuration)
- [If You Need Help](#if-you-need-help)
- [License](#license)

Installation
------------

[](#installation)

```
composer require llama-laravel/menus
```

Now, append Laravel Menu service provider to `providers` array in `config/app.php`.

```

```

At the end of `config/app.php` add `'Menu'    => 'Llama\Menus\Facades\Menu'` to the `$aliases` array:

```

```

This registers the package with Laravel and creates an alias called `Menu`.

Getting Started
---------------

[](#getting-started)

You can define the menu definitions inside a [laravel middleware](http://laravel.com/docs/master/middleware). As a result anytime a request hits your application, the menu objects will be available to all your views.

Here is a basic usage:

```
