PHPackages                             sroutier/menu-builder - 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. sroutier/menu-builder

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

sroutier/menu-builder
=====================

A laravel package that allows to dynamically build and manage a set of menus and breadcrumb trails.

0.1.0(10y ago)056GPLv3PHPPHP &gt;=5.3.0

Since Feb 3Pushed 10y ago1 watchersCompare

[ Source](https://github.com/sroutier/menu-builder)[ Packagist](https://packagist.org/packages/sroutier/menu-builder)[ Docs](https://github.com/sroutier/menu-builder)[ RSS](/packages/sroutier-menu-builder/feed)WikiDiscussions master Synced 4w ago

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

menu-builder
============

[](#menu-builder)

[![Latest Version on Packagist](https://camo.githubusercontent.com/950ccffea45142614f753a51eaa83366780bc3c9fd0a15a175cdf73e3029957c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73726f75746965722f6d656e752d6275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sroutier/menu-builder)[![Software License](https://camo.githubusercontent.com/593d3efeb74012dc6de7db89d2833a5ec1621c3e236d115ca4c25d0b2410a324/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e63652d47504c76332d627269676874677265656e2e737667)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/e3647a352ff50b8a91c8a85fd99d42db1c841c3524bd190d87473cb85b1245d6/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f73726f75746965722f6d656e752d6275696c6465722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/sroutier/menu-builder)[![Coverage Status](https://camo.githubusercontent.com/90bf254d3a1f7fe28efc60b5223e79aaf9f4fdb2373f7656f63c2f43f395b3de/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f73726f75746965722f6d656e752d6275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/sroutier/menu-builder/code-structure)[![Quality Score](https://camo.githubusercontent.com/2c6ea7ebf3d4be5d9aa2c0365b088bc5dbfd736556e41a5e7f60404ed6a46fcd/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f73726f75746965722f6d656e752d6275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/sroutier/menu-builder)[![Total Downloads](https://camo.githubusercontent.com/c852ea72c0d5eb29483eb7681f8309c32fda3b7b6ddaf14f4eb20713459e8f0f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73726f75746965722f6d656e752d6275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sroutier/menu-builder)

This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.

Install
-------

[](#install)

Via Composer

```
$ composer require sroutier/menu-builder
```

Declare provider
----------------

[](#declare-provider)

Add this declaration in the provider array of your `./config/app.php` file:

```
    ...
        Sroutier\MenuBuilder\Providers\MenuBuilderServiceProvider::class,
    ...
```

Declare facade
--------------

[](#declare-facade)

Add this declaration in the aliases array of your './config/app.php' file:

```
    ...
        'MenuBuilder' => Sroutier\MenuBuilder\Facades\MenuBuilderFacade::class,
    ...
```

Publish assets
--------------

[](#publish-assets)

You will have to publish at least the migration script, the seeding scripts and the route example, but following the instructions below:

To publish all assets, run this command:

```
$ php artisan vendor:publish --provider="Sroutier\MenuBuilder\Providers\MenuBuilderServiceProvider"
```

To publish only the migrations, run this command:

```
$ php artisan vendor:publish --provider="Sroutier\MenuBuilder\Providers\MenuBuilderServiceProvider" --tag="migrations"
```

To publish only the seeds, run this command:

```
$ php artisan vendor:publish --provider="Sroutier\MenuBuilder\Providers\MenuBuilderServiceProvider" --tag="seeds"
```

To publish only the config, run this command:

```
$ php artisan vendor:publish --provider="Sroutier\MenuBuilder\Providers\MenuBuilderServiceProvider" --tag="config"
```

To publish only the routes, run this command:

```
$ php artisan vendor:publish --provider="Sroutier\MenuBuilder\Providers\MenuBuilderServiceProvider" --tag="routes"
```

To publish only the views, run this command:

```
$ php artisan vendor:publish --provider="Sroutier\MenuBuilder\Providers\MenuBuilderServiceProvider" --tag="views"
```

Setup the database
------------------

[](#setup-the-database)

Run the migration script to create the database with this command:

```
$ php artisan migrate
```

Then seed the database with at least the `root` menu entry taken from the seed files that you published as shown in the previous section. You could also edit the published seed files to add a few basic menu entries as shown in those files. To seed the database add this line to your main `database/seeds/DatabaseSeeder.php` file using the code below:

```
    $this->call('ProductionSeeder');
```

Once ready, call the artisan seed command:

```
$ php artisan db:seed
```

**NOTE:** If you are in a development environment and want to create a few extra menu entries, have a look at the seed file `MenuBuilderDevSeeder.php` that was publish along with the Prod file.

Define routes
-------------

[](#define-routes)

You must define the routes that you want to use, this task can be helped by publishing the routes as shown in the previous section. This will create a file called `routes-menu-builder.php` in the directory `app/Http`containing examples of routes needed for this package. You must configure your own routes by either copying and pasting the content of the routes file, in part or in it's entirety, to your routes file `app/Http/routes.php`, or you could include a reference to the published file by adding a this line:

```
    require __DIR__.'/routes-menu-builder.php';
```

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

[](#change-log)

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

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

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

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Sebastien Routier](https://github.com/sroutier)
- [All Contributors](../../contributors)

License
-------

[](#license)

The GNU General Public License Version 3 (GPLv3). Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

3800d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3011606?v=4)[Sebastien Routier](/maintainers/sroutier)[@sroutier](https://github.com/sroutier)

---

Top Contributors

[![sroutier](https://avatars.githubusercontent.com/u/3011606?v=4)](https://github.com/sroutier "sroutier (2 commits)")

---

Tags

laravelmenumenu-buildersroutier

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sroutier-menu-builder/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M337](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k9.6k1](/packages/vinkius-labs-laravel-page-speed)[webwizo/laravel-shortcodes

Wordpress like shortcodes for Laravel 11, 12 and 13

223700.9k8](/packages/webwizo-laravel-shortcodes)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90142.9k](/packages/emargareten-inertia-modal)[erag/laravel-pwa

A simple and easy-to-use PWA (Progressive Web App) package for Laravel applications.

177124.1k](/packages/erag-laravel-pwa)

PHPackages © 2026

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