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

ActiveLibrary

sukristyan/laravel-menu-wrapper
===============================

A lightweight Laravel package to simplify building dynamic and structured menus in your applications.

1.0.4(1y ago)2161MITPHPPHP ^8.1

Since May 3Pushed 1y ago1 watchersCompare

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

READMEChangelog (4)DependenciesVersions (6)Used By (0)

Laravel Menu Wrapper
====================

[](#laravel-menu-wrapper)

Laravel Menu Wrapper is a lightweight package that helps you manage dynamic menus in your Laravel app with less effort.

> Simply put, this package automatically generates an array of menus based on what you define.

Tested on Laravel `10.x`, `11.x`, and `12.x` — works successfully without any issues.

Installation
============

[](#installation)

Using Composer (recommended):

```
cd your-laravel-project
composer require sukristyan/laravel-menu-wrapper
```

After the installation is complete, the provider and configuration files will be published automatically.

Configuration
=============

[](#configuration)

Currently, there are only 2 configuration items.

Group As (`group_as`)
---------------------

[](#group-as-group_as)

Values: `item` or `key`.

This setting determines how your menus will be grouped.

`key` means that your group label will be used as the array key. Your defined menu will look like this:

```
[
    'Group Name' => [
        [
            'label' => 'Menu #1',
        ],
        [
            'label' => 'Menu #2',
        ]
    ],
    ...
]
```

`item` means that your group label will be included in the array as `group_name`, and your defined menus will be inserted under `childs`. Your menu will look like this:

```
[
    [
        'group_name' => 'Group Name',
        'childs' => [
            [
                'label' => 'Menu #1',
            ],
            [
                'label' => 'Menu #2',
            ],
        ],
    ],
    ...
]
```

Populated Items (`populated_items`)
-----------------------------------

[](#populated-items-populated_items)

Here, you can define what you want to collect from the 'Illuminate\\Routing\\Route', or add custom identifiers to help integrate the menu into your application.

```
'populate_items' => function (Route $route) {
    return [
        'route_name' => $route->getName(),
        'type' => 'children'
    ];
}
```

Usage
=====

[](#usage)

> NOTE: All collected data will follow what you define in `config/laravel-menu-wrapper.php`.

Go to your 'routes/web.php', and add the `menu('Menu Label', 'Group Label')` function to your route:

```
Route::get('index', [DashboardController::class, 'index'])
    ->name('index')
    ->menu('Dashboard');
```

After that, you can run `php artisan menu:list` to show all your menus. You can also get all menus using this code:

```
app('sukristyan.menu')->all();
```

You can parse the resulting menu array and use it anywhere in your project.

You can directly use it in a `foreach` loop, or create a custom page to manage the menu — allowing administrators to add or remove menu items for users.

```
$menus = app('sukristyan.menu')->all();

foreach ($menus as $menu) {
    ...
}
```

License
=======

[](#license)

The `sukristyan/laravel-menu-wrapper` package is open-sourced software licensed under the [MIT license](https://github.com/sukristyan/laravel-menu-wrapper/blob/master/LICENSE).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance49

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

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

4

Last Release

373d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/936152dd99c2d3e474fd3bd4f89edf0533a455a5c7510ca2543385a576e4447f?d=identicon)[sukristyan](/maintainers/sukristyan)

---

Top Contributors

[![sukristyan](https://avatars.githubusercontent.com/u/91511974?v=4)](https://github.com/sukristyan "sukristyan (25 commits)")

---

Tags

dynamic-menularavellaravel-frameworklaravel-menularavel-packagemenularavelwrappermenularavel-menularavel wrapperdynamic menugroup menularavel menu wrapper

### Embed Badge

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

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

###  Alternatives

[codedredd/laravel-soap

A SoapClient wrapper integration for Laravel

221516.6k3](/packages/codedredd-laravel-soap)[awes-io/navigator

🧿 Build navigation or menu for Laravel and Awes.io. Unlimit complexity and depth of the menu.

4922.8k](/packages/awes-io-navigator)[balajidharma/laravel-menu

Laravel database menu manager

1715.4k2](/packages/balajidharma-laravel-menu)[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)[wujunze/money-wrapper

MoneyPHP Wrapper

113.8k](/packages/wujunze-money-wrapper)

PHPackages © 2026

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