PHPackages                             hieu-le/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. hieu-le/active

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

hieu-le/active
==============

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

9.0.0(4y ago)4111.5M↑19.6%87[2 PRs](https://github.com/letrunghieu/active/pulls)16MITPHPPHP ^8.0

Since Mar 12Pushed 2y ago8 watchersCompare

[ Source](https://github.com/letrunghieu/active)[ Packagist](https://packagist.org/packages/hieu-le/active)[ Docs](https://www.hieule.info/tag/laravel-active/)[ RSS](/packages/hieu-le-active/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (34)Used By (16)

Active for Laravel
==================

[](#active-for-laravel)

[![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)

Caution

**This repository is not maintained any more. Please feel free to fork it and make it compatible to new versions of Laravel.**

The helper class for Laravel applications to get active class base on current url.

Since version 7.0, the major version of this library will match the major version of Laravel.

Laravel versionActive library version&gt;= 7.x&gt;= 7.x6.x4.x5.x3.x4.x1.xInstallation
------------

[](#installation)

Require this package as your dependencies:

```
composer require hieu-le/active

```

> If you are using Laravel 5.5+, you do not need to manually register the ServiceProvider and Alias.

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

```
HieuLe\Active\ActiveServiceProvider::class,
```

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

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

Usage
-----

[](#usage)

See: [How to use Active](https://www.hieule.info/tag/laravel-active/)

Changelog:
----------

[](#changelog)

- v7.0: support Laravel 7 and start using the same marjor version with Laravel
- v4.0: support Laravel 6 and PHPUnit 8
- v3.5: support Laravel 5.5.x and PHPUnit 6
- v3.4: support Laravel 5.4.x
- v3.3: support Laravel 5.3.x
- v3.2: allows first parameter of `if_*` functions to be string or array
- v3.1: support both Laravel 5.2.x and 5.1.x
- v3.0: new API

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity59

Moderate usage in the ecosystem

Community35

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 88.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 ~100 days

Recently: every ~411 days

Total

30

Last Release

1531d ago

Major Versions

2.3.1 → 3.0.12015-11-16

3.5.1 → 4.0.02019-10-12

4.0.0 → 7.0.02020-03-16

7.0.0 → 8.0.02020-09-11

8.0.0 → 9.0.02022-03-10

PHP version history (6 changes)1.0PHP &gt;=5.3.0

1.2PHP &gt;=5.4.0

3.0.0PHP &gt;=5.5.9

3.5.0PHP &gt;=7.0

4.0.0PHP &gt;=7.2

9.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/98ce9136dff54b74ddb9afe69ae5c9c0cf573b00603e80ad9ee332f24f0b1342?d=identicon)[letrunghieu](/maintainers/letrunghieu)

---

Top Contributors

[![letrunghieu](https://avatars.githubusercontent.com/u/1145335?v=4)](https://github.com/letrunghieu "letrunghieu (94 commits)")[![timgreenwood](https://avatars.githubusercontent.com/u/514451?v=4)](https://github.com/timgreenwood "timgreenwood (3 commits)")[![lloricode](https://avatars.githubusercontent.com/u/8251344?v=4)](https://github.com/lloricode "lloricode (2 commits)")[![lowerends](https://avatars.githubusercontent.com/u/6588791?v=4)](https://github.com/lowerends "lowerends (1 commits)")[![mattrandallbecker](https://avatars.githubusercontent.com/u/6162544?v=4)](https://github.com/mattrandallbecker "mattrandallbecker (1 commits)")[![sebastienheyd](https://avatars.githubusercontent.com/u/5470423?v=4)](https://github.com/sebastienheyd "sebastienheyd (1 commits)")[![buraksh](https://avatars.githubusercontent.com/u/3154917?v=4)](https://github.com/buraksh "buraksh (1 commits)")[![valorin](https://avatars.githubusercontent.com/u/897369?v=4)](https://github.com/valorin "valorin (1 commits)")[![ilumos](https://avatars.githubusercontent.com/u/509407?v=4)](https://github.com/ilumos "ilumos (1 commits)")[![Jamesking56](https://avatars.githubusercontent.com/u/253237?v=4)](https://github.com/Jamesking56 "Jamesking56 (1 commits)")

---

Tags

laravelroutingactive

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hieu-le-active/health.svg)

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

###  Alternatives

[watson/active

Laravel helper for recognising the current route, controller and action

3253.6M14](/packages/watson-active)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4205.3M84](/packages/livewire-volt)

PHPackages © 2026

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