PHPackages                             vynatu/menu - 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. vynatu/menu

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

vynatu/menu
===========

An extendable and async menu package for Laravel

1.0.5(8y ago)34672[1 PRs](https://github.com/Vynatu/Menu/pulls)MITPHPPHP &gt;=7.0

Since Apr 13Pushed 8y ago2 watchersCompare

[ Source](https://github.com/Vynatu/Menu)[ Packagist](https://packagist.org/packages/vynatu/menu)[ RSS](/packages/vynatu-menu/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (1)Versions (7)Used By (0)

Find the API documentation [here](https://menu.packages.vynatu.io/)

- [Introduction](#introduction)
    - [Installation](#installation)
- [Creating a Menu](#creating-a-menu)
    - [Setup the Service Provider](#setup-the-service-provider)
    - [Create the New Menu](#create-the-new-menu)
    - [Add items to the menu](#add-items-to-the-menu)
    - [Registering the menu](#registering-the-menu)
    - [Extending a menu](#extending-a-menu)
    - [Accessing menu items in a menu instance](#accessing-menu-items-in-a-menu-instance)
    - [Setting variables to a menu item](#setting-variables-to-a-menu-item)
- [Views](#views)
    - [Item iteration in views](#item-iteration-in-views)
- [Tips](#tips)

Introduction
============

[](#introduction)

This package is yet another menu library. This library is different than the others because:

- It is lazy loaded
- Any menu is extendable
- It is not loaded in a middleware
- Each menu declaration is in it's own class

This structure makes it perfect to modularize and extend your menus through the usage of different module libraries the laravel framework can support.

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

[](#installation)

*Vynatu/Menu* only uses a single `service provider`.

*First, install with composer:*

```
composer require vynatu/menu
```

Then, add the service provider to `app.php`:

```
