PHPackages                             devysm/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. devysm/laravel-menu-builder

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

devysm/laravel-menu-builder
===========================

 Wordpress like drag &amp; drop menu builder for Laravel 9.x

v1.5.3(2y ago)167MITJavaScriptPHP ~5.4|~5.5|5.6|~7.0|~7.1|^7.2|^7.3|^7.4|^8.0|^8.1

Since Sep 15Pushed 2y agoCompare

[ Source](https://github.com/DevYSM/laravel-menu-builder)[ Packagist](https://packagist.org/packages/devysm/laravel-menu-builder)[ RSS](/packages/devysm-laravel-menu-builder/feed)WikiDiscussions master Synced 1mo ago

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

Drag and Drop Menu Builder for Laravel 9.x
==========================================

[](#drag-and-drop-menu-builder-for-laravel-9x)

[![Latest Stable Version](https://camo.githubusercontent.com/6a93331286156d46b61ea738b029f4fb1fa158d5434c63ccedfbdbb00ff034af/68747470733a2f2f706f7365722e707567782e6f72672f44657659534d2f6c61726176656c2d6d656e752d6275696c6465722f762f737461626c65)](https://packagist.org/packages/DevYSM/laravel-menu-builder) [![Latest Unstable Version](https://camo.githubusercontent.com/cca37c8c5b69c8684644b9eaa262f17edd4b2ddc0edce7828bb863533b4f2daa/68747470733a2f2f706f7365722e707567782e6f72672f44657659534d2f6c61726176656c2d6d656e752d6275696c6465722f762f756e737461626c65)](https://packagist.org/packages/DevYSM/laravel-menu-builder) [![Total Downloads](https://camo.githubusercontent.com/e022c24c1177cee9229c0acb586de5945190272dbc3cb2ff60d5baf5532aa002/68747470733a2f2f706f7365722e707567782e6f72672f44657659534d2f6c61726176656c2d6d656e752d6275696c6465722f646f776e6c6f616473)](https://packagist.org/packages/DevYSM/laravel-menu-builder) [![Monthly Downloads](https://camo.githubusercontent.com/eb6343c3e5288f9675fb5ae51e1191bea04c8c95fc47c2b9748ba3be9411e079/68747470733a2f2f706f7365722e707567782e6f72672f44657659534d2f6c61726176656c2d6d656e752d6275696c6465722f642f6d6f6e74686c79)](https://packagist.org/packages/DevYSM/laravel-menu-builder)

Originally forked from [harimayco/wmenu-builder](https://github.com/harimayco/wmenu-builder), but under active maintenance.

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

### Installation

[](#installation)

1. Run

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

2. Add facade in the config/app.php (optional )

```
'Menu' => DevYSM\Menu\Facades\Menu::class,
```

4. Run publish to get configs, views, assets and migrations.

```
php artisan vendor:publish --provider="DevYSM\Menu\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 DevYSM\Menu\Models\Menus;
use DevYSM\Menu\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 DevYSM\Menu\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 DevYSM\Menu\Facades\Menu;
...
/*
Parameter: Menu ID
Return: Array
*/
$menuList = Menu::getByName('Admin');
```

### Customization

[](#customization)

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

### Credits

[](#credits)

- [wmenu](https://github.com/lordmacu/wmenu) - laravel package menu like wordpress
- [wmenu-builder](https://github.com/harimayco/wmenu-builder) - Laravel Drag and Drop Dynamic Menu Generator (Wordpress look alike)

### Compatibility

[](#compatibility)

- Tested with Laravel 10.x.

### Known Issues

[](#known-issues)

**Note:** Look at .

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity83

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

Recently: every ~105 days

Total

30

Last Release

1054d ago

PHP version history (5 changes)1.0.1PHP &gt;=5.4.0

1.4.0PHP &gt;=7.2

v1.5.0PHP &gt;=8.0

v1.0PHP &gt;=8.1

v1.5.3PHP ~5.4|~5.5|5.6|~7.0|~7.1|^7.2|^7.3|^7.4|^8.0|^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/94ad099ac29460710c50f3c27489ebd2e8ee24d3cd5bfbaf040cd5d4a3a2dd1a?d=identicon)[Yassen Sayed](/maintainers/Yassen%20Sayed)

---

Top Contributors

[![harimayco](https://avatars.githubusercontent.com/u/5478980?v=4)](https://github.com/harimayco "harimayco (63 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)")[![DevYSM](https://avatars.githubusercontent.com/u/59166666?v=4)](https://github.com/DevYSM "DevYSM (16 commits)")[![efectn](https://avatars.githubusercontent.com/u/45270788?v=4)](https://github.com/efectn "efectn (14 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

laravelwordpressbuildermenudrag-and-drop

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/devysm-laravel-menu-builder/health.svg)](https://phpackages.com/packages/devysm-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)
