PHPackages                             therour/menu-directive - 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. [Templating &amp; Views](/categories/templating)
4. /
5. therour/menu-directive

ActiveLibrary[Templating &amp; Views](/categories/templating)

therour/menu-directive
======================

Create a menu with blade directive

v1.0.1(6y ago)08MITPHPPHP ^7.1.13

Since Nov 10Pushed 6y ago1 watchersCompare

[ Source](https://github.com/therour/menu-directive)[ Packagist](https://packagist.org/packages/therour/menu-directive)[ RSS](/packages/therour-menu-directive/feed)WikiDiscussions master Synced 5d ago

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

Laravel Menu Directive
======================

[](#laravel-menu-directive)

Create a menu for navigation with blade directive

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

[](#installation)

Just install the package via composer

```
composer require therour/menu-directive

```

Configuration
-------------

[](#configuration)

1. Publish the config file

```
php artisan vendor:publish --provider="Therour\MenuDirective\MenuDirectiveServiceProvider"

```

2. You can change the builder with your own class to match your UI in the `config/menu-directive.php` file. the example builder is defined on default config.

```
'builder' => Therour\MenuDirective\BootstrapMenuBuilder::class,
```

Create Menu Builder
-------------------

[](#create-menu-builder)

\-- WIP --

Create menu
-----------

[](#create-menu)

```
@sidebarHeading('Heading 1') // output Heading 1

@sidebarMenu([ // Create Menu
    'title' => 'Application',
    'icon' => 'fas fa-fw fa-cubes',
    'url' => '#',
    // 'active' => '/' // define your url pattern to match for giving active class
    // by default is current url == menu's url will set the menu's class active.
])

@sidebarDropdown([ // Create Dropdown menu
    'title' => 'Dropdowns',
    'icon' => 'fas fa-fw fa-cubes',
    'active' => '/dropdowns/*' // same as menu's active url pattern
    ], function ($dropdown) {
        $dropdown->heading('Heading:'); // add heading inside dropdown
        $dropdown->menu(['title' => 'Sub Menu 1', 'url' => url('dropdowns/1')]);
        $dropdown->menu(['title' => 'Sub Menu 2', 'url' => url('dropdowns/2')]);
        $dropdown->menu(['title' => 'Sub Menu 3', 'url' => url('dropdowns/3')]);
        $dropdown->menu(['title' => 'Sub Menu 4', 'url' => url('dropdowns/4')]);
    }
)
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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 ~131 days

Total

2

Last Release

2247d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/86f52784d71b1c9dd763012ac0c0f5d14e5c45aa2fa79676d3261a24ac813da2?d=identicon)[therour](/maintainers/therour)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/therour-menu-directive/health.svg)

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

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[tightenco/jigsaw

Simple static sites with Laravel's Blade.

2.2k438.5k29](/packages/tightenco-jigsaw)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

703141.0k7](/packages/tallstackui-tallstackui)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[spatie/laravel-export

Create a static site bundle from a Laravel app

646127.9k5](/packages/spatie-laravel-export)[laravellux/html

HTML and Form Builders for the Laravel Framework

35239.2k3](/packages/laravellux-html)

PHPackages © 2026

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