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

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

rc1021/laravel-menu-architect
=============================

backend menu builder

v1.0(6y ago)3391MITPHPPHP &gt;=7.0

Since Mar 17Pushed 6y ago1 watchersCompare

[ Source](https://github.com/rc1021/laravel-menu-architect)[ Packagist](https://packagist.org/packages/rc1021/laravel-menu-architect)[ RSS](/packages/rc1021-laravel-menu-architect/feed)WikiDiscussions master Synced 2d ago

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

Laravel Menu Architect
======================

[](#laravel-menu-architect)

[![Total Downloads](https://camo.githubusercontent.com/c467cffdd955d038ca425664dc928d7baa5ed1005304d049707ac5d1357946be/68747470733a2f2f706f7365722e707567782e6f72672f7263313032312f6c61726176656c2d6d656e752d6172636869746563742f646f776e6c6f6164732e737667)](https://packagist.org/packages/rc1021/laravel-menu-architect)[![License](https://camo.githubusercontent.com/35d955902b86e839dccfca089d9db6310ec0ccce1dd2b1260af187ddf932c525/68747470733a2f2f706f7365722e707567782e6f72672f7263313032312f6c61726176656c2d6d656e752d6172636869746563742f6c6963656e73652e737667)](https://packagist.org/packages/rc1021/laravel-menu-architect)

A quick and easy way to build menus in [Laravel](http://laravel.com/)

[![Laravel Menu Architect](https://raw.githubusercontent.com/rc1021/laravel-menu-architect/master/screenshot.png)](https://raw.githubusercontent.com/rc1021/laravel-menu-architect/master/screenshot.png)

Installation
------------

[](#installation)

```
composer require rc1021/laravel-menu-architect
```

If you are in Laravel 5.5 you won't need to edit your `config/app.php`, if you are in a previous version of Laravel, please do the following:

Append Laravel Menu service provider to `providers` array in `config/app.php`.

```
'providers' => [

        /*
         * Laravel Framework Service Providers...
         */
        Illuminate\Foundation\Providers\ArtisanServiceProvider::class,
        Illuminate\Auth\AuthServiceProvider::class,
        Illuminate\Broadcasting\BroadcastServiceProvider::class,

    ...

        Rc1021\LaravelMenuArchitect\LaravelMenuArchitectServiceProvider::class,

        ...

],
```

At the end of `config/app.php` add `'MenuArct'    => Rc1021\LaravelMenuArchitect\Facades\MenuArct::class` to the `$aliases` array:

```
'aliases' => [

    'App'       => Illuminate\Support\Facades\App::class,
    'Artisan'   => Illuminate\Support\Facades\Artisan::class,
    ...
    'MenuArct'      => Rc1021\LaravelMenuArchitect\Facades\MenuArct::class,

],
```

This registers the package with Laravel and creates an alias called `MenuArct`.

To use your own settings, publish config.

```
php artisan vendor:publish --provider="Rc1021\\LaravelMenuArchitect\\LaravelMenuArchitectServiceProvider"
```

Getting Started
---------------

[](#getting-started)

Start up laravel server

```
php artisan serve
```

and open [http://127.0.0.1:8000/menu\_arct](http://127.0.0.1:8000/menu_arct) get start.

Demo data (seeder)
------------------

[](#demo-data-seeder)

You can seeder the database first.

```
php artisan db:seed --class=MenuArchitectSeeder
```

Finally, open a view and add:

```
{!! menu_arct('admin') !!}
```

Your menu will be created and displayed on the page.

Output data
-----------

[](#output-data)

You can also get menu data format by 'array' or 'json', like that:

```
$arr_menu = menu_arct('admin', '_array');
$json_menu = menu_arct('admin', '_json');
```

Output display
--------------

[](#output-display)

[![Display Menu](https://raw.githubusercontent.com/rc1021/laravel-menu-architect/master/output_display.png)](https://raw.githubusercontent.com/rc1021/laravel-menu-architect/master/output_display.png)

Custom data method
------------------

[](#custom-data-method)

You can customize some methods to use `$menu`, `$menu->items`(relation with menu\_id), `$items`(parent-children).

```
$customize_func = function ($menu)
{
    // $menu: main menu modal.
    // $menu->items: items by menu_id.
    // $menu->buildTree(): get a hierarchical array data.(parent, children)

    $collection = collect($menu->items);
    $filtered = $collection->filter(function ($item, $key) {
        return $item['depth'] == 2 and isset($item['children']);
    });
    return $filtered->all();
}

$customize_data = menu_arct('admin', 'key', ['key' => $customize_func]);
```

Output display with custom view
-------------------------------

[](#output-display-with-custom-view)

[![Custom View](https://raw.githubusercontent.com/rc1021/laravel-menu-architect/master/custom_view.png)](https://raw.githubusercontent.com/rc1021/laravel-menu-architect/master/custom_view.png)

Now, you can add a view to `resources/views/vendor/menu_architect/display` to render menu.

if you have a view called `your_view.blade.php`

```
// your_view.blade.php

// $menu: main menu modal
// $menu->items: items by menu_id
// $items: Hierarchical array data(parent, children)

    @foreach ($items as $item)
        {{$item['label']}}
        @if(isset($item['children']))
            @each('menu_architect::menu.display.adminlte_list', $item['children'], 'item')
        @endif
    @endforeach

```

and you can do `menu_arct('admin', 'your_view')` to render result

If You Need Help
----------------

[](#if-you-need-help)

Please submit all issues and questions using GitHub issues and I will try to help you.

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

[](#contributing)

Please feel free to submit pull requests if you can improve or add any features.

Credits
-------

[](#credits)

- [許益銘 rc1021](https://github.com/rc1021)
- [All Contributors](https://github.com/rc1021/laravel-menu-architect/graphs/contributors)

License
-------

[](#license)

*Laravel Menu Architect* is free software distributed under the terms of the MIT license.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

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

2248d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bafd5e242dd41ff15444747efe21bb93e607d49772c41a4fe7ffadcdbc5b64a2?d=identicon)[rc1021](/maintainers/rc1021)

---

Top Contributors

[![rc1021](https://avatars.githubusercontent.com/u/1082597?v=4)](https://github.com/rc1021 "rc1021 (6 commits)")

---

Tags

laravelmenumenu-buildermenu-generator

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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