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

ActiveLaravel-package[Utility &amp; Helpers](/categories/utility)

juy/active-menu
===============

The helper class for Laravel applications to get active class base on current route name

1.1.3(9y ago)53.1k2MITPHPPHP &gt;=5.5.9

Since Jan 12Pushed 6y ago2 watchersCompare

[ Source](https://github.com/juy/ActiveMenu)[ Packagist](https://packagist.org/packages/juy/active-menu)[ Docs](https://github.com/juy/ActiveMenu)[ RSS](/packages/juy-active-menu/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (2)Versions (14)Used By (0)

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

[](#active-menu-laravel-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/68565dc80bb8e610f1400c0762b5ce542defcf50febb2b0c1716fd9598340375/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a75792f6163746976652d6d656e752e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/juy/active-menu) [![Software License](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE.txt)

> Helper class for Laravel applications to get active class base on current route name *(It's only detect "route name, this is enough for us.")*.

---

### Supported/Tested Laravel versions

[](#supportedtested-laravel-versions)

- Laravel **5.1** | **5.2** | **5.3** | **5.4**

### Requirements

[](#requirements)

- Laravel &gt;= 5.1 : Laravel 5.1 or above.
- PHP &gt;= 5.5.9 : PHP 5.5.9 or above on your machine.

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

[](#installation)

### Step:1 Install through composer

[](#step1-install-through-composer)

#### Install

[](#install)

```
➜ composer require juy/active-menu

```

> #### Manual install (alternative)
>
> [](#manual-install-alternative)

> Simply add the following to the "require" section of your composer.json file, and run `composer update` command.

> ```
> "juy/active-menu": "^1.1"
> ```

#### Remove

[](#remove)

```
➜ composer remove juy/active-menu

```

### Step 2: Add the service provider

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

Append this line to your **service providers** array in `config/app.php`.

```
Juy\ActiveMenu\ServiceProvider::class,
```

### Step 3: Publish config

[](#step-3-publish-config)

Publish config file.

```
➜ php artisan vendor:publish --provider="Juy\ActiveMenu\ServiceProvider" --tag="config"

```

### Config overview

[](#config-overview)

You can modify css active class with custom one *(default is 'active')* in `config/activemenu.php` *(after publish)*.

```
return [

    // The default css class value if the request match given route name
    'class' => 'active',

];
```

Usage, samples
--------------

[](#usage-samples)

Alias/Facade

```
Active::route('route.name');
```

Application container

```
app('active')->route('route.name');
```

Helper function

```
active_route('route.name');
```

Wildcard samples

```
Active::route('route.name.*');
active_route('route.name.*');
```

Multi route with wilcard

```
Active::route(['route.name1.*', 'route.name2.*']);
active_route(['route.name1.*', 'route.name2.*']);
```

Custom blade directive

```
@ifActiveRoute('route.name')
    Foo
@else
    Bar
@endif

```

---

Real life usage

```

    Dashboard

```

---

### License

[](#license)

This project is open-sourced software licensed under the [MIT License](LICENSE.txt).

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

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

Recently: every ~56 days

Total

12

Last Release

3347d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7eac408a2127af4440cf731d2358f23ef551a86f3c09263a1ad3e1a0de841edf?d=identicon)[angelside](/maintainers/angelside)

---

Top Contributors

[![angelside](https://avatars.githubusercontent.com/u/7515?v=4)](https://github.com/angelside "angelside (88 commits)")

---

Tags

laravelpackagelaravelclassmenuactive

### Embed Badge

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

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

###  Alternatives

[watson/active

Laravel helper for recognising the current route, controller and action

3253.6M14](/packages/watson-active)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[dragon-code/pretty-routes

Pretty Routes for Laravel

10058.7k4](/packages/dragon-code-pretty-routes)[zonneplan/laravel-module-loader

Module loader for Laravel

24118.4k](/packages/zonneplan-laravel-module-loader)[bjuppa/laravel-blog

Add blog functionality to your Laravel project

483.3k2](/packages/bjuppa-laravel-blog)[nedwors/navigator

A Laravel package to ease defining navigation menus

433.1k](/packages/nedwors-navigator)

PHPackages © 2026

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