PHPackages                             gaba93/laravel-menu-updated - 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. gaba93/laravel-menu-updated

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

gaba93/laravel-menu-updated
===========================

Laravel 5.5 Menu generator

1.3(8y ago)332MITPHP

Since Jul 31Pushed 8y ago2 watchersCompare

[ Source](https://github.com/Gaba93/laravel-menu-updated)[ Packagist](https://packagist.org/packages/gaba93/laravel-menu-updated)[ Docs](https://github.com/Gaba93/laravel-menu-updated)[ RSS](/packages/gaba93-laravel-menu-updated/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

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

[](#laravel-menu)

[![Latest Stable Version](https://camo.githubusercontent.com/ec8c2bbc462b585f0ea071dbb7691bd9334d02c39ae657b5e48589917496d534/68747470733a2f2f706f7365722e707567782e6f72672f6c61766172792f6c61726176656c2d6d656e752f762f737461626c652e737667)](https://packagist.org/packages/lavary/laravel-menu)[![Latest Unstable Version](https://camo.githubusercontent.com/5045c28b7c1927196d5e997cd8cdfda0ed078022cbe34aabeaee76336eca6bca/68747470733a2f2f706f7365722e707567782e6f72672f6c61766172792f6c61726176656c2d6d656e752f762f756e737461626c652e737667)](https://packagist.org/packages/lavary/laravel-menu)[![Total Downloads](https://camo.githubusercontent.com/e415a807b19358542a33b9c34d62ce42249d8b0b734c018c2bfea9128a8a2b82/68747470733a2f2f706f7365722e707567782e6f72672f6c61766172792f6c61726176656c2d6d656e752f646f776e6c6f6164732e737667)](https://packagist.org/packages/lavary/laravel-menu)[![License](https://camo.githubusercontent.com/13a4757f83dc604764d0793275b23a474ce4c53498187161835e588338b10058/68747470733a2f2f706f7365722e707567782e6f72672f6c61766172792f6c61726176656c2d6d656e752f6c6963656e73652e737667)](https://packagist.org/packages/lavary/laravel-menu)

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

**For Laravel 4.x, check [version 1.5.0](https://github.com/lavary/laravel-menu/tree/v1.5.0)**

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)
    - [Control Structure for Blade](#control-structure-for-blade)
        - [@lm-attrs](#lm-attrs)
- [Configuration](#configuration)
- [If You Need Help](#if-you-need-help)
- [License](#license)

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

[](#installation)

```
composer require lavary/laravel-menu
```

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

```

```

At the end of `config/app.php` add `'Menu'    => 'Lavary\Menu\Facade'` 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:

```
