PHPackages                             ferhnir/laravel-spatie-menu - 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. ferhnir/laravel-spatie-menu

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

ferhnir/laravel-spatie-menu
===========================

Laravel Spatie/Menu with Bootstrap for Laravel 9

149PHP

Since Jul 21Pushed 3y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (2)Used By (0)

Menu Generator for spatie/laravel-menu
======================================

[](#menu-generator-for-spatielaravel-menu)

This generator provides a support for spatie/laravel-menu with php8

Example:
========

[](#example)

### Links:

[](#links)

```
#serviceProvider:

view()->composer(['your.blade'], function () {
    app('your-instance-name')->add(
        LaravelSpatieMenuService::createLink(
            route: route('buildings.index'),
            title: 'Buildings',
            icon: ''
        )
    );
});
```

### Submenus:

[](#submenus)

```
view()->composer(['your.blade'], function () {

    $uniqueSubmenuID = 'ExampleID';

    //CREATE SUBMENU MAIN LINK
    $linkNew = LaravelSpatieMenuService::createLink(
        route: '#',
        title: 'ExampleLink',
        icon: '',
        uniqueSubmenuID: $uniqueSubmenuID
    );

    //CREATE SUBMENU OBJECT
    //Create submenuList for submenuObj
    $submenuList = LaravelSpatieMenuService::buildSubmenuList(
        submenuLinksArray: [
            [
                'title' => 'Show All',
                'icon' => '',
                'url' => route('example.index'),
                'rule' => ['browse-example']
            ], [
                'title' => 'Add Company',
                'icon' => '',
                'url' => route('example.create'),
                'rule' => ['add-example']
            ], [
                'title' => 'Archive',
                'icon' => '',
                'url' => route('example.archive'),
                'rule' => ['delete-example']
            ],
            ...
        ]
    );

    //Create submenuObj
    $submenuObj = LaravelSpatieMenuService::newMenu(
        uniqueSubmenuID: $uniqueSubmenuID,
        wrapperTag: 'div',
        parentTag: false,
        activeClassOnLink: true
    );

    //Attach submenuObj to menu instance
    app('your-instance-name')->submenu(
        $linkNew,
        $submenuObj->add($submenuList)
    );

});
```

### Blade 'your.blade'

[](#blade-yourblade)

```
{!! app('your-instance-name') !!}
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 Bus Factor1

Top contributor holds 60% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3542744eeb5090593cfe4b83459e3f7e6f8a336acda9263744e3ea4fe7ca8893?d=identicon)[Ferhnir](/maintainers/Ferhnir)

---

Top Contributors

[![maksymilianzdunski](https://avatars.githubusercontent.com/u/230386977?v=4)](https://github.com/maksymilianzdunski "maksymilianzdunski (3 commits)")[![Ferhnir](https://avatars.githubusercontent.com/u/10587671?v=4)](https://github.com/Ferhnir "Ferhnir (2 commits)")

### Embed Badge

![Health badge](/badges/ferhnir-laravel-spatie-menu/health.svg)

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

###  Alternatives

[mnito/round-robin

Round-robin schedule generation implementation in PHP

6169.4k](/packages/mnito-round-robin)

PHPackages © 2026

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