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

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

ibrand/laravel-active
=====================

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

v3.0(5y ago)316.5k2MITPHPPHP &gt;=7.2

Since Mar 26Pushed 4y ago1 watchersCompare

[ Source](https://github.com/guojiangclub/laravel-active)[ Packagist](https://packagist.org/packages/ibrand/laravel-active)[ Docs](http://www.hieule.info/products/active-class-helper-laravel-4/)[ RSS](/packages/ibrand-laravel-active/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (3)Used By (2)

Active for Laravel 4/5
======================

[](#active-for-laravel-45)

[![Build Status](https://camo.githubusercontent.com/d9a52ab5ecac137a34a6443279376c1b53d34839a834c171f031806b5c115419/68747470733a2f2f7472617669732d63692e6f72672f6c657472756e67686965752f6163746976652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/letrunghieu/active)[![Latest Stable Version](https://camo.githubusercontent.com/8bdb5d4cc9c859eabea35d9d0e9357ce9d00054fc6af77e5ce62be301515a8a2/68747470733a2f2f706f7365722e707567782e6f72672f686965752d6c652f6163746976652f762f737461626c652e737667)](https://packagist.org/packages/hieu-le/active)[![Code Climate](https://camo.githubusercontent.com/aceab4d3dccfe98229c5bd57a7cb35baa9cef08a30dd11dd096fa681a49dae03/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6c657472756e67686965752f6163746976652f6261646765732f6770612e737667)](https://codeclimate.com/github/letrunghieu/active)[![Test Coverage](https://camo.githubusercontent.com/b96cd1b9dd640e05a4de8c55d86f87a3e72b0c5377f2552aca7985c2bf2dd47d/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6c657472756e67686965752f6163746976652f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/letrunghieu/active/coverage)[![Total Downloads](https://camo.githubusercontent.com/e0b550d3e4bd3b817defedc758626f4910616a9e3fd01d4eef16517f23ff96a7/68747470733a2f2f706f7365722e707567782e6f72672f686965752d6c652f6163746976652f646f776e6c6f6164732e737667)](https://packagist.org/packages/hieu-le/active)[![License](https://camo.githubusercontent.com/7adf69e530752ed0ed04e341c6db5f295be4fbf7046ce7e0fa55f380e2e8ce3e/68747470733a2f2f706f7365722e707567782e6f72672f686965752d6c652f6163746976652f6c6963656e73652e737667)](https://packagist.org/packages/hieu-le/active)

The helper class for Laravel 4/5 applications to get active class base on current route.

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

[](#installation)

Add this package to your `composer.json` file and run `composer update` once.

For Laravel 5

```
"hieu-le/active": "~2.0"

```

or for Laravel 4

```
"hieu-le/active": "~1.0"

```

If you use this package in Laravel, the most suitable version will be selected base on the version of Laravel package.

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

```
'HieuLe\Active\ActiveServiceProvider',
```

Append this line to your `aliases` array in `config/app.php`

```
'Active' => 'HieuLe\Active\Facades\Active',
```

### Changes in version 1.2

[](#changes-in-version-12)

Support new method `Active::routePattern`. This method will check the current **route name** with an array of patterns instead of an array of route names.

### Changes in version 2.0

[](#changes-in-version-20)

- Support Laravel 5.0
- Use PSR-4 instead of PSR-0
- Support new method `Active::uri`. This method will check the current URI (**with** the leading slash `/`)

### Changes in version 2.1/1.3

[](#changes-in-version-2113)

- Support new method `Active::query`. This method will check whether the value of an query string parameter equals to or contains a specified value.

### Changes in version 2.2/1.4

[](#changes-in-version-2214)

- Support optional parameter for inactive class, thanks @lowerends

### Changes in version 2.3

[](#changes-in-version-23)

- Support new method `Active::routeParam`. This method check the current route name and route parameters with some specific values.

For more details about usage see: [this page](http://www.hieule.info/products/active-class-helper-laravel-4/)

果酱云社区
-----

[](#果酱云社区)

 [ ![点击跳转](https://camo.githubusercontent.com/6359e5bd680f99c0f946287e22a32d5935d94a942ae2116a0b2f6f0c7a70ccca/68747470733a2f2f63646e2e67756f6a69616e672e636c75622f696d6167652f323032322f30322f31362f77755f316673306a62636f32313832673238306c317661676d376265362e706e67) ](https://guojiang.club/)

- 全网真正免费的IT课程平台
- 专注于综合IT技术的在线课程，致力于打造优质、高效的IT在线教育平台
- 课程方向包含Python、Java、前端、大数据、数据分析、人工智能等热门IT课程
- 300+免费课程任你选择

 [ ![点击跳转](https://camo.githubusercontent.com/8f168577f9682601d01cf6c726dbbccd911815b2b6d4f999e27475448f22a107/68747470733a2f2f63646e2e67756f6a69616e672e636c75622f696d6167652f323032322f30322f31362f77755f316673306c383261653170713131653433316a366e31376a7331767137362e706e67) ](https://guojiang.club/)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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 ~913 days

Total

2

Last Release

2059d ago

Major Versions

v2.0 → v3.02020-09-25

PHP version history (2 changes)v2.0PHP &gt;=5.5.9

v3.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/05a4dd937f49471fe1d2cb4da6445668df23b2ad2422789b3aaed3ef9459c377?d=identicon)[shjchen](/maintainers/shjchen)

---

Top Contributors

[![chenbidepro](https://avatars.githubusercontent.com/u/9166101?v=4)](https://github.com/chenbidepro "chenbidepro (2 commits)")[![tangqi1916](https://avatars.githubusercontent.com/u/193469035?v=4)](https://github.com/tangqi1916 "tangqi1916 (1 commits)")

---

Tags

laravelroutingactive

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  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)[bjuppa/laravel-blog

Add blog functionality to your Laravel project

483.3k2](/packages/bjuppa-laravel-blog)

PHPackages © 2026

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