PHPackages                             toxic-lemurs/menu-builder - 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. [Database &amp; ORM](/categories/database)
4. /
5. toxic-lemurs/menu-builder

ActiveLibrary[Database &amp; ORM](/categories/database)

toxic-lemurs/menu-builder
=========================

A simple database driven menu manager for Laravel 6

2.0.3(5y ago)613.1k4MITPHPPHP ^7.2

Since Sep 15Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ToxicLemurs/MenuBuilder)[ Packagist](https://packagist.org/packages/toxic-lemurs/menu-builder)[ Docs](https://github.com/ToxicLemurs/MenuBuilder)[ RSS](/packages/toxic-lemurs-menu-builder/feed)WikiDiscussions master Synced 1mo ago

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

Simple database driven menu manager for Laravel 6
-------------------------------------------------

[](#simple-database-driven-menu-manager-for-laravel-6)

This package allows you to create tree based menu structures that are database driven (Eloquent) and renders HTML based on fully customizable templates and views. There is no limit the nesting level but the amount of levels will need to be handled in your views / templates.

Installation:
-------------

[](#installation)

Require this package in your composer.json and update composer. This will download the package and all the dependencies:

```
"toxic-lemurs/menu-builder": "2.*"

```

Alternatively you can require this through composer via the command line:

```
$ composer require toxic-lemurs/menu-builder

```

### Laravel Package Auto Discovery:

[](#laravel-package-auto-discovery)

The Menu-Builder package supports Package Auto Discovery. If you don't want to use package auto discovery you can add the provider in your config/app.php in the providers array:

```
ToxicLemurs\MenuBuilder\MenuBuilderServiceProvider::class,

```

Optionally you can make use of the Facade by adding the facade in the aliases array:

```
'MenuBuilder' => ToxicLemurs\MenuBuilder\Facades\MenuBuilder::class,

```

### Publish migrations and assets:

[](#publish-migrations-and-assets)

Publish the Menu Builder migrations:

```
$ php artisan vendor:publish --provider="ToxicLemurs\MenuBuilder\MenuBuilderServiceProvider" --tag=migrations
$ php artisan migrate

```

You can optionally publish the views so you can easily override them with your site's styling and layout:

```
$ php artisan vendor:publish --provider="ToxicLemurs\MenuBuilder\MenuBuilderServiceProvider" --tag=views

```

Publish the config to tie and modify the default administration routes to your project:

```
$ php artisan vendor:publish --provider="ToxicLemurs\MenuBuilder\MenuBuilderServiceProvider" --tag=config

```

Getting started:
----------------

[](#getting-started)

In your views / templates you can use the Facade to render your menu:

```
{!! MenuBuilder::render('Group Name') !!}

```

Alternatively if you do not want to use the Alias:

```
{!! ToxicLemurs\MenuBuilder\Facades\MenuBuilder::render('Group Name') !!}

```

Default routes have been setup for managing the menu:

```
/menu - Manages your actual menu items that gets attached to menu groups
/group - Setup menu groups to easily group your different menus

```

You can override the default routes with your own custom routes (The package routes are currently defined individually and not as resources to allow for override flexibility):

```
Route::get('my/route/menu', ['uses' => '\ToxicLemurs\MenuBuilder\Http\Controllers\MenuController@index', 'as' => 'menu.index'])

```

Overriding the views:
---------------------

[](#overriding-the-views)

You can override the default implementation of how the menu gets rendered by modifying your published views:

```
views/menu/default.blade.php - This is the master template for binding the menu partials
views/menu/partials/list.blade.php - This is the partial that creates the list items / html for the menu

```

Alternatively you can specify custom templates to use for your base templates on a per menu level:

```
{!! MenuBuilder::render('Group Name', $options = [
    'templates' => [
        // The container file overrides the views/menu/default.blade.php template
        'container' => 'foo.bar', // resources/views/foo/bar.blade.php

        // The builder file overrides the views/menu/partials/list.blade.php
        'builder' => 'bar.foo', // resource/views/bar/foo.blade.php
    ]
]) !!}

```

You can look inside the example folder for an implementation of the Menu Builder by copying the vendor folder into your resources folder. Make sure your database contains menu items. Example source can be [found here](http://bootsnipp.com/snippets/featured/responsive-navigation-menu).

### License:

[](#license)

This Menu Builder for Laravel is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~117 days

Recently: every ~90 days

Total

17

Last Release

2015d ago

Major Versions

1.2.2 → 2.0.02020-01-20

PHP version history (4 changes)1.0.0PHP &gt;=5.3.0

1.0.4PHP &gt;=5.5.9

1.2.2PHP ^7.1.3

2.0.0PHP ^7.2

### Community

Maintainers

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

---

Top Contributors

[![ToxicLemurs](https://avatars.githubusercontent.com/u/14289728?v=4)](https://github.com/ToxicLemurs "ToxicLemurs (12 commits)")[![spaantje](https://avatars.githubusercontent.com/u/477362?v=4)](https://github.com/spaantje "spaantje (7 commits)")[![deriknel](https://avatars.githubusercontent.com/u/2233156?v=4)](https://github.com/deriknel "deriknel (6 commits)")[![willgopublic](https://avatars.githubusercontent.com/u/16573344?v=4)](https://github.com/willgopublic "willgopublic (2 commits)")[![DonBroughton](https://avatars.githubusercontent.com/u/7228426?v=4)](https://github.com/DonBroughton "DonBroughton (1 commits)")

---

Tags

laraveldatabasehtmleloquenttemplateSimplemenumenu-buildermenushtml menus

### Embed Badge

![Health badge](/badges/toxic-lemurs-menu-builder/health.svg)

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

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k7.2M71](/packages/mongodb-laravel-mongodb)[spiritix/lada-cache

A Redis based, automated and scalable database caching layer for Laravel

591444.8k2](/packages/spiritix-lada-cache)[nayjest/grids

Grids for Laravel 4 &amp; Laravel 5 frameworks

200152.0k1](/packages/nayjest-grids)[pdphilip/elasticsearch

An Elasticsearch implementation of Laravel's Eloquent ORM

145360.2k4](/packages/pdphilip-elasticsearch)[czim/laravel-filter

Filter for Laravel Eloquent queries, with support for modular filter building

8973.0k3](/packages/czim-laravel-filter)[toponepercent/baum

Baum is an implementation of the Nested Set pattern for Eloquent models.

3154.7k](/packages/toponepercent-baum)

PHPackages © 2026

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