PHPackages                             ggets/laravel-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ggets/laravel-menu-builder

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

ggets/laravel-menu-builder
==========================

Drag and Drop menu generator like Wordpress for Laravel 9+

2.3.0(3y ago)162Apache-2.0CSSPHP &gt;=7.2 || ^8.1

Since Aug 18Pushed 3y agoCompare

[ Source](https://github.com/ggets/laravel-menu-builder)[ Packagist](https://packagist.org/packages/ggets/laravel-menu-builder)[ Docs](https://dreamflame.in)[ RSS](/packages/ggets-laravel-menu-builder/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (49)Used By (0)

Laravel Drag and Drop menu editor like wordpress
================================================

[](#laravel-drag-and-drop-menu-editor-like-wordpress)

### \*This package was forked from a previously abandoned one: It will take some time to fix support for laravel 9+ and the rest of the issues. Please be patient if you are in a search for a working version of the menu builder. Thank you!

[](#this-package-was-forked-from-a-previously-abandoned-one-it-will-take-some-time-to-fix-support-for-laravel-9-and-the-rest-of-the-issues-please-be-patient-if-you-are-in-a-search-for-a-working-version-of-the-menu-builder-thank-you)

[![Latest Stable Version](https://camo.githubusercontent.com/b69312182c7cb98cb963acc6e85514d5d29d4171841bf56c9c812fdea50a42ce/68747470733a2f2f706f7365722e707567782e6f72672f67676574732f6c61726176656c2d6d656e752d6275696c6465722f762f737461626c65)](https://packagist.org/packages/ggets/laravel-menu-builder) [![Latest Unstable Version](https://camo.githubusercontent.com/629bb6a632edcfbe3dba16746b939021e2e148efeea02767d836cb82c734d405/68747470733a2f2f706f7365722e707567782e6f72672f67676574732f6c61726176656c2d6d656e752d6275696c6465722f762f756e737461626c65)](https://packagist.org/packages/ggets/laravel-menu-builder) [![Total Downloads](https://camo.githubusercontent.com/662ea0584acc86d6c7ab33c4d98c8fc2b610031fe11dadf21f0b55ff0ee0443e/68747470733a2f2f706f7365722e707567782e6f72672f67676574732f6c61726176656c2d6d656e752d6275696c6465722f646f776e6c6f616473)](https://packagist.org/packages/ggets/laravel-menu-builder) [![Monthly Downloads](https://camo.githubusercontent.com/2905fb9f8c8d06618614c858a51d159329dec47a6c7cee0b798ab35447394e68/68747470733a2f2f706f7365722e707567782e6f72672f67676574732f6c61726176656c2d6d656e752d6275696c6465722f642f6d6f6e74686c79)](https://packagist.org/packages/ggets/laravel-menu-builder)

forked from [![Laravel drag and drop menu](https://raw.githubusercontent.com/ggets/wmenu-builder/master/screenshot.png)](https://raw.githubusercontent.com/ggets/wmenu-builder/master/screenshot.png)

### Installation

[](#installation)

1. Prerequisites

0.1. jQuery

0.2. jQueryUI (with plugins)

0.3. Bootstrap

0.4. Fontawesome

To install dependencies via npm, run:

```
npm i jquery@3.6
npm i jquery-ui@1.13
npm i bootstrap@4.6
```

You are responsible for your own copy of FontAwesome.

Then in your laravel Mix config (*resources/js/app.js*)

```
// resources/js/app.js
//
// jQuery
window.$=window.jQuery=require('jquery');
require('jquery-ui/ui/widget.js');
require('jquery-ui/ui/widgets/mouse.js');
require('jquery-ui/ui/widgets/sortable.js');
require('jquery-ui/ui/widgets/draggable.js');
require('jquery-ui/ui/widgets/droppable.js');
// Bootstrap
require('bootstrap');
```

Then, to compile your mix, run:

```
npm run dev
```

1. Run

```
composer require ggets/laravel-menu-builder
```

***Step 2 &amp; 3 are optional if you are using laravel 5.5***

2. Add the following class, to "providers" array in the file config/app.php (optional on laravel 5.5)

```
ggets\MenuBuilder\MenuServiceProvider::class,
```

3. add facade in the file config/app.php (optional on laravel 5.5)

```
'Menu' => ggets\MenuBuilder\Facades\Menu::class,
```

4. Run publish

```
php artisan vendor:publish --provider="ggets\MenuBuilder\MenuServiceProvider"
```

5. Configure (optional) in ***config/menu.php*** :

- ***CUSTOM MIDDLEWARE:*** You can add you own middleware
- ***TABLE PREFIX:*** By default this package will create 2 new tables named "menus" and "menu\_items" but you can still add your own table prefix avoiding conflict with existing table
- ***TABLE NAMES*** If you want use specific name of tables you have to modify that and the migrations
- ***Custom routes*** If you want to edit the route path you can edit the field
- ***Role Access*** If you want to enable roles (permissions) on menu items

6. Run migrate

```
php artisan migrate
```

DONE

### Menu Builder Usage Example - displays the builder

[](#menu-builder-usage-example---displays-the-builder)

On your view blade file

```
@extends('app')

@section('contents')
    {!! Menu::render() !!}
@endsection

//YOU MUST HAVE JQUERY LOADED BEFORE menu scripts
@push('scripts')
    {!! Menu::scripts() !!}
@endpush
```

### Using The Model

[](#using-the-model)

Call the model class

```
use ggets\MenuBuilder\Models\Menus;
use ggets\MenuBuilder\Models\MenuItems;
```

### Menu Usage Example (a)

[](#menu-usage-example-a)

A basic two-level menu can be displayed in your blade template

##### Using Model Class

[](#using-model-class)

```
/* get menu by id*/
$menu = Menus::find(1);
/* or by name */
$menu = Menus::where('name','Test Menu')->first();

/* or get menu by name and the items with EAGER LOADING (RECOMENDED for better performance and less query call)*/
$menu = Menus::where('name','Test Menu')->with('items')->first();
/*or by id */
$menu = Menus::where('id', 1)->with('items')->first();

//you can access by model result
$public_menu = $menu->items;

//or you can convert it to array
$public_menu = $menu->items->toArray();
```

##### or Using helper

[](#or-using-helper)

```
// Using Helper
$public_menu = Menu::getByName('Public'); //return array
```

### Menu Usage Example (b)

[](#menu-usage-example-b)

Now inside your blade template file place the menu using this simple example

```

        @if($public_menu)

            @foreach($public_menu as $menu)

                {{ $menu['label'] }}
                @if( $menu['child'] )

                    @foreach( $menu['child'] as $child )
                        {{ $child['label'] }}
                    @endforeach

                @endif

            @endforeach
        @endif

```

### HELPERS

[](#helpers)

### Get Menu Items By Menu ID

[](#get-menu-items-by-menu-id)

```
use ggets\MenuBuilder\Facades\Menu;
...
/*
Parameter: Menu ID
Return: Array
*/
$menuList = Menu::get(1);
```

### Get Menu Items By Menu Name

[](#get-menu-items-by-menu-name)

In this example, you must have a menu named *Admin*

```
use ggets\MenuBuilder\Facades\Menu;
...
/*
Parameter: Menu ID
Return: Array
*/
$menuList = Menu::getByName('Admin');
```

### Customization

[](#customization)

you can edit the menu interface in ***resources/views/vendor/ggets-menu-builder/menu-html.blade.php***

### Credits

[](#credits)

- [wmenu](https://github.com/lordmacu/wmenu) laravel package menu like wordpress

### Compatibility

[](#compatibility)

- Tested with laravel 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 6.x, 7.x, 8.x, 9.x

### KNOWN ISSUES

[](#known-issues)

- Not working with RTL websites [\#21](https://github.com/harimayco/wmenu-builder/issues/21) (pull requests are welcome)

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity85

Battle-tested with a long release history

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

Recently: every ~107 days

Total

47

Last Release

1114d ago

Major Versions

1.4.5 → 2.0.12022-02-13

PHP version history (3 changes)1.0.0PHP &gt;=5.4.0

1.4.0PHP &gt;=7.2

2.0.1PHP &gt;=7.2 || ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/7b4a2ce3963dc7979f1f0cad12bd5ec2861af8400c183824bba41940c6f74b30?d=identicon)[ggets](/maintainers/ggets)

---

Top Contributors

[![harimayco](https://avatars.githubusercontent.com/u/5478980?v=4)](https://github.com/harimayco "harimayco (63 commits)")[![ggets](https://avatars.githubusercontent.com/u/4815620?v=4)](https://github.com/ggets "ggets (23 commits)")[![lordmacu](https://avatars.githubusercontent.com/u/10134930?v=4)](https://github.com/lordmacu "lordmacu (20 commits)")[![DeveloperOnCall](https://avatars.githubusercontent.com/u/3272625?v=4)](https://github.com/DeveloperOnCall "DeveloperOnCall (18 commits)")[![ezequiel9](https://avatars.githubusercontent.com/u/15575053?v=4)](https://github.com/ezequiel9 "ezequiel9 (5 commits)")[![monwolf](https://avatars.githubusercontent.com/u/1116133?v=4)](https://github.com/monwolf "monwolf (5 commits)")[![buzzclue](https://avatars.githubusercontent.com/u/43321373?v=4)](https://github.com/buzzclue "buzzclue (3 commits)")[![deep2065](https://avatars.githubusercontent.com/u/23185745?v=4)](https://github.com/deep2065 "deep2065 (2 commits)")[![SadiqUltra](https://avatars.githubusercontent.com/u/6016404?v=4)](https://github.com/SadiqUltra "SadiqUltra (1 commits)")[![konmavrakis](https://avatars.githubusercontent.com/u/5990379?v=4)](https://github.com/konmavrakis "konmavrakis (1 commits)")[![lordmacus](https://avatars.githubusercontent.com/u/9418745?v=4)](https://github.com/lordmacus "lordmacus (1 commits)")[![nauvalazhar](https://avatars.githubusercontent.com/u/14899175?v=4)](https://github.com/nauvalazhar "nauvalazhar (1 commits)")[![odhier](https://avatars.githubusercontent.com/u/28082192?v=4)](https://github.com/odhier "odhier (1 commits)")

---

Tags

laravelwordpressbuildermenu

### Embed Badge

![Health badge](/badges/ggets-laravel-menu-builder/health.svg)

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

###  Alternatives

[nedwors/navigator

A Laravel package to ease defining navigation menus

433.1k](/packages/nedwors-navigator)[nguyendachuy/laravel-menu

Laravel Menu Builder | Drag &amp; Drop | Bootstrap | Laravel 7 | Laravel 8 | Laravel 9 | Laravel 10 | Laravel 11 | Laravel 12

162.2k](/packages/nguyendachuy-laravel-menu)

PHPackages © 2026

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