PHPackages                             sahibalejandro/laravel-active-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. sahibalejandro/laravel-active-menu

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

sahibalejandro/laravel-active-menu
==================================

Blade directives to manage menu states in a clean an easy way.

1.2.1(9y ago)1131MITPHP

Since Aug 9Pushed 9y ago1 watchersCompare

[ Source](https://github.com/sahibalejandro/laravel-active-menu)[ Packagist](https://packagist.org/packages/sahibalejandro/laravel-active-menu)[ RSS](/packages/sahibalejandro-laravel-active-menu/feed)WikiDiscussions master Synced today

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

Laravel Active Menu
===================

[](#laravel-active-menu)

[![Build Status](https://camo.githubusercontent.com/e1af6fa624355a79d0ddf9c9c133653b18d2044581481aac04403a3017cd8147/68747470733a2f2f7472617669732d63692e6f72672f7361686962616c656a616e64726f2f6c61726176656c2d6163746976652d6d656e752e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/sahibalejandro/laravel-active-menu)[![Latest Stable Version](https://camo.githubusercontent.com/6f39bca455e87083276798784f7e04607f0b2ab803a1bcb5d612024c69fa735e/68747470733a2f2f706f7365722e707567782e6f72672f7361686962616c656a616e64726f2f6c61726176656c2d6163746976652d6d656e752f762f737461626c65)](https://packagist.org/packages/sahibalejandro/laravel-active-menu)[![Total Downloads](https://camo.githubusercontent.com/9b3f019946b2353651078b81b6c74523d7d9af7487bff11e96e2bc5d27c1e390/68747470733a2f2f706f7365722e707567782e6f72672f7361686962616c656a616e64726f2f6c61726176656c2d6163746976652d6d656e752f646f776e6c6f616473)](https://packagist.org/packages/sahibalejandro/laravel-active-menu)[![License](https://camo.githubusercontent.com/d9d76195696c1314caf6b74f35bd6446519862d537649acf7837739b7a0aead7/68747470733a2f2f706f7365722e707567782e6f72672f7361686962616c656a616e64726f2f6c61726176656c2d6163746976652d6d656e752f6c6963656e7365)](https://packagist.org/packages/sahibalejandro/laravel-active-menu)

Blade directives for Laravel 5.1+ to manage menu states in a clean an easy way.

Install
-------

[](#install)

```
composer require sahibalejandro/laravel-active-menu

```

Usage
-----

[](#usage)

Call `@activate(...)` to specify the activated menu:

```
@activate('security_settings')
```

Now call `@active(...)` directive to know if a specified menu is active:

```

        Settings

                Security

```

This directive will print the string `active` if the given menu is activated. The example above will result on the following HTML:

```

        Settings

                Security

```

Now just add a `li.active a { ... }` styles to your CSS and you're ready.

Using dot-notation
------------------

[](#using-dot-notation)

Use dot-notation to activate the menu cascade up, for example, using this directive:

```
@activate('settings.security')
```

This will activate `settings` and `settings.security`, so the following directives will print the string `active`:

```
@active('settings')
@active('settings.security')
```

Change the class name
---------------------

[](#change-the-class-name)

You can change the class name passing it as a second parameter:

```
@active('user.account', 'link-active')
```

But I really recomend you stick to the convention and use the default value.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

Established project with proven stability

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

Total

4

Last Release

3583d ago

### Community

Maintainers

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

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sahibalejandro-laravel-active-menu/health.svg)

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

###  Alternatives

[moodle/moodle

Moodle - the world's open source learning platform

7.2k86.6k70](/packages/moodle-moodle)

PHPackages © 2026

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