PHPackages                             cvega/mainmenu - 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. cvega/mainmenu

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

cvega/mainmenu
==============

A simple and easy main menu for Laravel using Bootstrap5

v1.0.0(3y ago)15mitPHPPHP ^7.3|^8.0

Since Jun 6Pushed 3y ago1 watchersCompare

[ Source](https://github.com/carlosvegab/mainmenu)[ Packagist](https://packagist.org/packages/cvega/mainmenu)[ RSS](/packages/cvega-mainmenu/feed)WikiDiscussions main Synced 1mo ago

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

Main Menu
=========

[](#main-menu)

A simple and easy main menu for Laravel using Bootstrap5.

[![MIT License](https://camo.githubusercontent.com/7c124530b7c185c6928998842a1a52ed4bfd21071bf67db8f325f470cc3160a3/68747470733a2f2f696d672e736869656c64732e696f2f61706d2f6c2f61746f6d69632d64657369676e2d75692e7376673f)](https://github.com/tterb/atomic-design-ui/blob/master/LICENSEs)

Author
------

[](#author)

- [Carlos Vega](https://www.carlosvega.net)

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

[](#installation)

Install Mainmenu with Composer

```
  composer require cvega/mainmenu
```

And run some Laravel Artisan commands to publish content

```
  php artisan vendor:publish --provider="Cvega\Mainmenu\src\MainmenuServiceProvider.php" --tag="mainmenu_config"
  php artisan vendor:publish --provider="Cvega\Mainmenu\src\MainmenuServiceProvider.php" --tag="mainmenu_views_components"
  php artisan vendor:publish --provider="Cvega\Mainmenu\src\MainmenuServiceProvider.php" --tag="mainmenu_migrations"
  php artisan vendor:publish --provider="Cvega\Mainmenu\src\MainmenuServiceProvider.php" --tag="mainmenu_seeders"
```

You need to use Bootstrap 5.

Documentation
-------------

[](#documentation)

After installed, you will have the following files:

```
- a migration in your "migrations" folder, with the schema for the "mainmenu" table
- a seeder in your "seeders" folder with some stuff data, you can change it for yours
- a component called "mainmenu" located in resources/views/components
- a component class called "MainmenuComponent.php" in app/View/Components.

```

How Can You Use This Menu?

You need to have an array with your menu structure:

```
use Cvega\Mainmenu\Http\Controllers\MainmenuController;

public function some_method_in_your_controller()
{
    $mainmenu = new MainmenuController(); // retrieving menu structure from the Database

    return view(YOUR BLADE TEMPLATE, [
        'menu' => $mainmenu->main_menu,
    ]);
}
```

This way you will have a $menu variable in your template and you will be able to invoke the component:

```

```

Make sure you are using Bootstrap 5.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

1441d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0f6f86250e377430bffde4892d368d85e97e1b6e5ee46d09f81643b580614c19?d=identicon)[carlosvega.net](/maintainers/carlosvega.net)

---

Top Contributors

[![carlosvegab](https://avatars.githubusercontent.com/u/106979457?v=4)](https://github.com/carlosvegab "carlosvegab (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cvega-mainmenu/health.svg)

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

###  Alternatives

[alchemy/zippy

Zippy, the archive manager companion

47522.6M51](/packages/alchemy-zippy)[kotchuprik/php-short-id

Yet another Short ID generator. The library help you generate short id like youtube, vimeo, bit.ly, etc.

3054.4k](/packages/kotchuprik-php-short-id)[transprime-research/piper

PHP Pipe method execution with values from chained method executions

174.6k2](/packages/transprime-research-piper)

PHPackages © 2026

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