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

ActiveLibrary

laralabs/menu
=============

Menu package for Laravel, build it with classes, and render it how you want to from a collection/array/json.

2.0.0(5y ago)011MITPHPPHP ^7.3

Since Nov 17Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Laralabs/menu)[ Packagist](https://packagist.org/packages/laralabs/menu)[ RSS](/packages/laralabs-menu/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependencies (5)Versions (8)Used By (0)

 [![](https://camo.githubusercontent.com/2c82e96baac4f5bad9d4bfd73ac8b44eeb3745e86b31911b5506b97c01606c60/68747470733a2f2f6173736574732e6c6172616c6162732e756b2f7061636b616765732f6d656e752f6d656e755f6c6f676f2e706e67)](https://camo.githubusercontent.com/2c82e96baac4f5bad9d4bfd73ac8b44eeb3745e86b31911b5506b97c01606c60/68747470733a2f2f6173736574732e6c6172616c6162732e756b2f7061636b616765732f6d656e752f6d656e755f6c6f676f2e706e67)

[![Stable Build](https://camo.githubusercontent.com/bcac6fb14a415d566da6988b2ca97eef9f2a03b6545df66f335467ca9967844a/68747470733a2f2f706f7365722e707567782e6f72672f6c6172616c6162732f6d656e752f76657273696f6e)](https://packagist.org/packages/laralabs/menu)[![Build Status](https://camo.githubusercontent.com/400116d0ca00c534ef8ced528eeb30e0a927fc9a54813cf38e13f27aba846a74/68747470733a2f2f7472617669732d63692e6f72672f4c6172616c6162732f6d656e752e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Laralabs/menu)[![StyleCI](https://camo.githubusercontent.com/90e464d7660672d32f2505dc01602728ca8fc0394ff56b250b95de259bb525e0/68747470733a2f2f7374796c6563692e696f2f7265706f732f3232323332313839392f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/222321899)[![](https://camo.githubusercontent.com/817f5ee59376a7bc8384b681183884203c4a57e34cf0d3b62ab253ff9aa962da/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f39313939663634306137326263333563316231302f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/Laralabs/menu/maintainability)[![](https://camo.githubusercontent.com/77dd9e03fa7b64235a5ede9391f644bcd29a4d659b400d389ae2ddff1d50e709/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f39313939663634306137326263333563316231302f746573745f636f766572616765)](https://codeclimate.com/github/Laralabs/menu/test_coverage)

Laralabs Menu
-------------

[](#laralabs-menu)

Simple, extendable menu package for Laravel.

You define how it renders, the package just gives you the data to do it with.

- Attach to a blade file via a view composer.
- Pass data into a Vue component, or do whatever you want with it!

🚀 Quick Start
-------------

[](#rocket-quick-start)

### Installation

[](#installation)

Require the package in the `composer.json` of your project.

```
composer require laralabs/menu

```

Publish the configuration file.

```
php artisan vendor:publish --tag=laralabs-menu-config

```

Not much in the configuration file at the moment, but you can choose to register your menus in here if you wish.

### Usage

[](#usage)

Add the `ResolveMenus` middleware to your `app/Http/Kernel.php` in the `$middleware` array:

```
    protected $middleware = [
        // Existing Middleware
        \Laralabs\Menu\Middleware\ResolveMenus::class,
    ];

```

Currently there are no make commands, but there are example menus found in the `tests/Fakes` directory.

Build a class that extends `Laralabs\Menu\Contracts\Menu` and implement the required methods.

Extenders can be built by creating a class that extends implements `Laralabs\Menu\Contracts\MenuExtender`, edit the menu and then return then return it out of the handle method with the closure `$next($menu)`.

Quick example of creating a menu in the `build()` method:

```
    public function build(): void
    {
        $this->menu->group('groupOne', static function (Group $group) {
            $group->item('Group One, Item One', function (Item $item) {
                $item->subItem('Sub Item');
            });
        });
    }

```

📙 Documentation
---------------

[](#orange_book-documentation)

Documentation TBC, take a look at the tests :)

💬 Support
---------

[](#speech_balloon-support)

Please raise an issue on GitHub if there is a problem.

🔑 License
---------

[](#key-license)

This is open-sourced software licensed under the [MIT License](http://opensource.org/licenses/MIT).

🙏 Credits
---------

[](#pray-credits)

Adapted from [Maatwebsite/Laravel-Sidebar](https://github.com/Maatwebsite/Laravel-Sidebar) for my own requirements, thank you to everyone at Maatwebsite for the work they do. Also, theirs might have a feature mine doesn't so go check it out too!

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~110 days

Total

4

Last Release

2040d ago

Major Versions

1.0.3 → 2.0.02020-10-14

PHP version history (2 changes)1.0.0PHP &gt;=7.1

2.0.0PHP ^7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/e435b69bacc2a02dba78ac929b92950a7b29d496c4164c84cb4b3cdac7d39c82?d=identicon)[Laralabs](/maintainers/Laralabs)

---

Top Contributors

[![clnt](https://avatars.githubusercontent.com/u/19330442?v=4)](https://github.com/clnt "clnt (17 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/laralabs-menu/health.svg)

```
[![Health](https://phpackages.com/badges/laralabs-menu/health.svg)](https://phpackages.com/packages/laralabs-menu)
```

###  Alternatives

[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
