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

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

bdacademy/laravel-menu
======================

Drag &amp; Drop menu builder like WordPress for Laravel 11.x

1.1(1y ago)0351MITJavaScriptPHP ^8.2

Since Jul 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/masrur447/laravel-menu)[ Packagist](https://packagist.org/packages/bdacademy/laravel-menu)[ Docs](https://github.com/masrur447/laravel-menu)[ RSS](/packages/bdacademy-laravel-menu/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

Drag &amp; Drop menu builder like WordPress for Laravel 11.x
============================================================

[](#drag--drop-menu-builder-like-wordpress-for-laravel-11x)

[![Laravel drag and drop menu](https://raw.githubusercontent.com/masrur447/laravel-menu/master/Screenshot.png)](https://raw.githubusercontent.com/masrur447/laravel-menu/master/Screenshot.png)

### Installation

[](#installation)

1. Run

```
composer require bdacademy/laravel-menu
```

2. Run publish

```
php artisan vendor:publish --provider="Bdacademy\LaravelMenu\LaravelMenuServiceProvider"
```

3. 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
- ***Post Model*** You can add your own post model. Default is Post
- ***Category Model*** You can add your own category model. Default is Category
- ***Post Title Column*** You can add your own post model title column. Default is title
- ***Category Title Column*** You can add your own category model title column. Default is name

4. Run migrate

```
php artisan migrate
```

DONE

### Laravel Menu Usage Example - displays the UI

[](#laravel-menu-usage-example---displays-the-ui)

On your view blade file

```
@extends('app')

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

// Recommended to Add Font Awesome CDN In Your Backend Header

//maxcdn.bootstrapcdn.com/font-awesome/6.1.1/css/font-awesome.min.css

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

### Using The Model

[](#using-the-model)

Call the model class

```
use Bdacademy\LaravelMenu\Models\Menus;
use Bdacademy\LaravelMenu\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','Your Menu name')->first();

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

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

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

##### or Using helper

[](#or-using-helper)

```
// Using Helper
$primary_menu = LaravelMenu::getByName('Primary'); //return array
```

### Menu Usage Example (b)

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

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

```

            @if ($primary_menu)
                @foreach ($primary_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 Bdacademy\LaravelMenu\Facades\LaravelMenu;
...
/*
Parameter: Menu ID
Return: Array
*/
$menuList = LaravelMenu::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 Bdacademy\LaravelMenu\Facades\LaravelMenu;
...
/*
Parameter: Menu ID
Return: Array
*/
$menuList = LaravelMenu::getByName('Admin');
```

### Customization

[](#customization)

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

### Credits

[](#credits)

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

### Compatibility

[](#compatibility)

- Tested with laravel 11.x
- Work only laravel 11.x

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

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

Every ~0 days

Total

2

Last Release

678d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/558bc813875ba01fe993716ded3afc93ad922c593418f18f9ce4e015c90d7cc3?d=identicon)[masrur447](/maintainers/masrur447)

---

Top Contributors

[![masrur447](https://avatars.githubusercontent.com/u/173551743?v=4)](https://github.com/masrur447 "masrur447 (3 commits)")

---

Tags

laravelwordpressbuildermenu

### Embed Badge

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

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

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