Skip to content
Laravel Drag and Drop Dynamic Menu Generator (Wordpress look alike)
Branch: master
Clone or download
Latest commit 2443d15 Jul 30, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets save menu when changed Jul 31, 2019
config Set use roles default Jun 5, 2019
migrations Adding Roles (Permissions) To Menu Items Jan 4, 2019
src adjust Jul 31, 2019
.gitignore Some fixes to roles usage and removing some unused css selectors May 29, 2019 Update Jul 31, 2019
composer.json Update composer.json Oct 19, 2017
screenshot.png add screenshot Jul 2, 2018

Laravel Drag and Drop menu editor like wordpress

Latest Stable Version Latest Unstable Version Total Downloads Monthly Downloads

forked from Laravel drag and drop menu


  1. Run
composer require harimayco/laravel-menu

Step 2 & 3 are optional if you are using laravel 5.5

  1. Add the following class, to "providers" array in the file config/app.php (optional on laravel 5.5)
  1. add facade in the file config/app.php (optional on laravel 5.5)
'Menu' => Harimayco\Menu\Facades\Menu::class,
  1. Run publish
php artisan vendor:publish --provider="Harimayco\Menu\MenuServiceProvider"
  1. 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
  1. Run migrate
php artisan migrate


Menu Builder Usage Example - displays the builder

On your view blade file


    {!! Menu::render() !!}

    {!! Menu::scripts() !!}

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

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

Call the model class

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

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)

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

<div class="nav-wrap">
    <div class="btn-menu">
    </div><!-- //mobile menu button -->
    <nav id="mainnav" class="mainnav">

        <ul class="menu">
            @foreach($public_menu as $menu)
            <li class="">
                <a href="{{ $menu['link'] }}" title="">{{ $menu['label'] }}</a>
                @if( $menu['child'] )
                <ul class="sub-menu">
                    @foreach( $menu['child'] as $child )
                        <li class=""><a href="{{ $child['link'] }}" title="">{{ $child['label'] }}</a></li>
                </ul><!-- /.sub-menu -->

        </ul><!-- /.menu -->
    </nav><!-- /#mainnav -->
 </div><!-- /.nav-wrap -->


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


  • wmenu laravel package menu like wordpress


  • Tested with laravel 5.2, 5.3, 5.4, 5.5, 5.6, 5.7
You can’t perform that action at this time.