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

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

shofiul/laravel-menu
====================

drag and drop menu generator like wordpress for laravel 5

v1.1.0(6y ago)07MITJavaScriptPHP &gt;=5.4.0

Since Dec 24Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Shofiul-Alam/laravel-6-menu)[ Packagist](https://packagist.org/packages/shofiul/laravel-menu)[ RSS](/packages/shofiul-laravel-menu/feed)WikiDiscussions master Synced 1mo ago

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

This repo is an updated version for Laravel 6.\*
================================================

[](#this-repo-is-an-updated-version-for-laravel-6)

Following  repo

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

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

[![Latest Stable Version](https://camo.githubusercontent.com/5b60f9c9f8b11e3485e98cca814e9326fd04330732cac4f88c7b83c9c2fc72f2/68747470733a2f2f706f7365722e707567782e6f72672f686172696d6179636f2f6c61726176656c2d6d656e752f762f737461626c65)](https://packagist.org/packages/harimayco/laravel-menu) [![Latest Unstable Version](https://camo.githubusercontent.com/b2d59b595678c2a7982bea9dee2922888bc1fca6540b32533ae577a1e4bcdabc/68747470733a2f2f706f7365722e707567782e6f72672f686172696d6179636f2f6c61726176656c2d6d656e752f762f756e737461626c65)](https://packagist.org/packages/harimayco/laravel-menu) [![Total Downloads](https://camo.githubusercontent.com/0c16b69bb60d4f0f150ecc7f2ba9b92962ca48f416ca3917a3d573f1973ca10f/68747470733a2f2f706f7365722e707567782e6f72672f686172696d6179636f2f6c61726176656c2d6d656e752f646f776e6c6f616473)](https://packagist.org/packages/harimayco/laravel-menu) [![Monthly Downloads](https://camo.githubusercontent.com/8d33b1781f109cffd521fc9d3752102c1e7deef4203514a67f5f738bbfee3cb6/68747470733a2f2f706f7365722e707567782e6f72672f686172696d6179636f2f6c61726176656c2d6d656e752f642f6d6f6e74686c79)](https://packagist.org/packages/harimayco/laravel-menu)

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

### Installation

[](#installation)

1. Run

```
composer require harimayco/laravel-menu
```

***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)

```
Harimayco\Menu\MenuServiceProvider::class,
```

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

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

4. Run publish

```
php artisan vendor:publish --provider="Harimayco\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
```

### Get Menu Items By Menu ID

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

```
use Harimayco\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 Harimayco\Menu\Facades\Menu;
...
/*
Parameter: Menu ID
Return: Array
*/
$menuList = Menu::getByName('Admin');
```

### Using The Model

[](#using-the-model)

Call the model class

```
use Harimayco\Menu\Models\Menus;
use Harimayco\Menu\Models\MenuItems;
```

### Menu Usage Example (a)

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

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

```
// Used to get the menu items into the blade template
$public_menu = Menu::getByName('Public');
```

### 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

```

### Customization

[](#customization)

you can edit the menu interface in ***resources/views/vendor/wmenu/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

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

Unknown

Total

1

Last Release

2328d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13927209?v=4)[Shofiul-Alam](/maintainers/Shofiul-Alam)[@Shofiul-Alam](https://github.com/Shofiul-Alam)

---

Top Contributors

[![shofiul-krost](https://avatars.githubusercontent.com/u/271435432?v=4)](https://github.com/shofiul-krost "shofiul-krost (4 commits)")

---

Tags

laravelwordpressbuildermenu

### Embed Badge

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

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

###  Alternatives

[outl1ne/nova-menu-builder

This Laravel Nova package allows you to create and manage menus and menu items.

243246.0k3](/packages/outl1ne-nova-menu-builder)[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)
