PHPackages                             mkdesignn/menubuilder - 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. mkdesignn/menubuilder

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

mkdesignn/menubuilder
=====================

menu builder is a package which can make you a menu by the input config

v0.4-alpha(9y ago)455[1 issues](https://github.com/mkdesignn/menubuilder/issues)mitPHPPHP &gt;=5.5.9

Since Jun 23Pushed 6y ago1 watchersCompare

[ Source](https://github.com/mkdesignn/menubuilder)[ Packagist](https://packagist.org/packages/mkdesignn/menubuilder)[ RSS](/packages/mkdesignn-menubuilder/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (4)Dependencies (3)Versions (6)Used By (0)

Dynamic menu builder
--------------------

[](#dynamic-menu-builder)

dynamic menu builder is a quick and easy way to create your menu. I'v always wanted a way to generate a menu without recreating everything from the Base.

> note, vue.js ver2 will needed for this project.

Usage
-----

[](#usage)

### Step 1: install it through composer

[](#step-1-install-it-through-composer)

```
composer require mkdesignn/menubuilder

```

### Step 2: Add the Service Provider

[](#step-2-add-the-service-provider)

```
Mkdesignn\MenuBuilder\MenuProvider::class

```

### Step 2: Add Facade class

[](#step-2-add-facade-class)

```
'Menu'      => Mkdesignn\MenuBuilder\Facade::class

```

### Step 3: publish the vendor files

[](#step-3-publish-the-vendor-files)

```
PHP artisan vendor: publish

```

above command will publish menu folder which contains two files, index.js and style.css which both of them should be included and also this command will publish menu.php config file.

Examples
--------

[](#examples)

Create simple menu
------------------

[](#create-simple-menu)

```
echo Menu::render('vertical', new \App\Tag(), "vertical-menu");

```

this way we can build simple menu, as you can see render method takes 3 arguments which I describe each of them in the below.

### first argument

[](#first-argument)

the first argument Is the type of the menu which wants to be created. it could be vertical or horizontal.

### second argument

[](#second-argument)

the second argument is the table which we need to use it as a source.

**The class that pass to the render method should be extended model abstract class**

the table tag that has been passed to the render method has the below structure

idparent\_idnameslugbg\_colorbg\_hover\_colortext\_colortext\_hover\_color10PhpPhp20JavascriptJavascript32JQueryJQuery42Vue.jsVue.js52Node.jsNode.js51LaravelLaravel51SymphonySymphony55NpmNpm54VuexVuexas you can see in the above grid there are a bunch of fields but there are some that are not necessary to use like the bg\_color, bg\_hover\_color, text\_color, text\_hover\_color, but you can use each of them. this way the menu look likes much more dynamically. the field parent\_id should remain **parent\_id** .

### third argument

[](#third-argument)

The third argument passed to the render method, it's a class selector which we can use it to add some CSS style to the menu. If no class passed then mk\_menu will be using as the default class.

### fourth argument

[](#fourth-argument)

we have the fourth argument which we can use it as configuration, the fourth argument should be an array and it'll be using for the configuration.

some of the examples
--------------------

[](#some-of-the-examples)

```
echo Menu::render('vertical', new \App\Tag(), "test");

```

[![Captchas examples](https://camo.githubusercontent.com/cbf6880b45001aaa740c5c1176b09042c1c3547b67f80835441b546e01ad1e02/687474703a2f2f636f646564657369676e2e69722f75706c6f6164732f6d656e755f323031372d30362d32345f32322d34352d34352e706e67)](https://camo.githubusercontent.com/cbf6880b45001aaa740c5c1176b09042c1c3547b67f80835441b546e01ad1e02/687474703a2f2f636f646564657369676e2e69722f75706c6f6164732f6d656e755f323031372d30362d32345f32322d34352d34352e706e67)

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity12

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

Every ~0 days

Total

4

Last Release

3285d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3639529?v=4)[mkdesign82](/maintainers/mkdesign82)[@mkdesign82](https://github.com/mkdesign82)

---

Top Contributors

[![mkdesignn](https://avatars.githubusercontent.com/u/4149125?v=4)](https://github.com/mkdesignn "mkdesignn (46 commits)")

---

Tags

csslaravelphpvuejs

### Embed Badge

![Health badge](/badges/mkdesignn-menubuilder/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[flarum/core

Delightfully simple forum software.

201.4M2.2k](/packages/flarum-core)[api-platform/laravel

API Platform support for Laravel

59156.3k11](/packages/api-platform-laravel)

PHPackages © 2026

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