PHPackages                             smartystudio/laravelmenu - 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. [Admin Panels](/categories/admin)
4. /
5. smartystudio/laravelmenu

AbandonedArchivedLibrary[Admin Panels](/categories/admin)

smartystudio/laravelmenu
========================

Drag and drop menu generator for Laravel.

v0.1(3y ago)020MITBladePHP &gt;=7.0

Since Dec 5Pushed 3y ago1 watchersCompare

[ Source](https://github.com/smartystudio/laravelmenu)[ Packagist](https://packagist.org/packages/smartystudio/laravelmenu)[ Docs](https://smartycms.net)[ RSS](/packages/smartystudio-laravelmenu/feed)WikiDiscussions main Synced 1mo ago

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

Drag and Drop menu generator for Laravel
========================================

[](#drag-and-drop-menu-generator-for-laravel)

An admin interface for [Laravel](https://laravel.com) to easily add, edit or remove Menus.

Install
-------

[](#install)

1. In your terminal:

```
composer require smartystudio/laravelmenu
```

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

2. If your Laravel version does not have package autodiscovery then add the service provider to your config/app.php file:

```
SmartyStudio\LaravelMenu\MenuServiceProvider::class,
```

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

```
'Menu' => SmartyStudio\LaravelMenu\Facades\Menu::class,
```

4. Publish the config file &amp; run the migrations.

```
php artisan vendor:publish --provider="SmartyStudio\LaravelMenu\MenuServiceProvider"
```

5. Configure (optional) in `config/laravelmenu.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 the database migrations:

```
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 SmartyStudio\LaravelMenu\Models\Menu;
use SmartyStudio\LaravelMenu\Models\MenuItem;
```

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 = Menu::find(1);

// Get menu by Name
$menu = Menu::where('name','Test Menu')->first();

/**
 * Get menu by Name and the Items with eager loading.
 * This is RECOMENDED for better performance and less query calls.
 */
$menu = Menu::where('name','Test Menu')->with('items')->first();

// Get menu by ID
$menu = Menu::where('id', 1)->with('items')->first();

// Access by Model result
$public_menu = $menu->items;

// Convert it to Array
$public_menu = $menu->items->toArray();
```

### Using Helper class

[](#using-helper-class)

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

### Customization of the menu

[](#customization-of-the-menu)

You can publish and edit the menu layout in `resources/views/vendor/smartystudio/laravelmenu/menu.blade.php`

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
// TODO
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email us instead of using the issue tracker.

Credits
-------

[](#credits)

- Martin Nestorov - Web Developer @ Smarty Studio.
- All Contributors

License
-------

[](#license)

The SmartyStudio\\LaravelMenu is open-source software licensed under the MIT license.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 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

1250d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4b0d8be99c9be0eee6152dc3be19a468ac8911c3cbe9306f1efc8efc692151e5?d=identicon)[mnestorov](/maintainers/mnestorov)

---

Top Contributors

[![mnestorov](https://avatars.githubusercontent.com/u/8516554?v=4)](https://github.com/mnestorov "mnestorov (13 commits)")

---

Tags

bootstraplaravellaravel-packagemenumenu-generatorphplaravelbuildermenucmscrudbootstrapadmin

### Embed Badge

![Health badge](/badges/smartystudio-laravelmenu/health.svg)

```
[![Health](https://phpackages.com/badges/smartystudio-laravelmenu/health.svg)](https://phpackages.com/packages/smartystudio-laravelmenu)
```

###  Alternatives

[serverfireteam/panel

Admin panel for Laravel applications

42532.2k2](/packages/serverfireteam-panel)[brackets/admin-generator

Laravel 8 CRUD generator for brackets/craftable

50190.9k](/packages/brackets-admin-generator)[serverfireteam/blog

A nice blog system with laravel and laravelpanel

523.1k](/packages/serverfireteam-blog)

PHPackages © 2026

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