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

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

rukhsar/laravel-active-route
============================

A laravel helper package.

v1.4(8y ago)63.6k2[1 issues](https://github.com/Rukhsar/laravel-active-route/issues)MITPHPPHP &gt;=5.4.0

Since Dec 6Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Rukhsar/laravel-active-route)[ Packagist](https://packagist.org/packages/rukhsar/laravel-active-route)[ RSS](/packages/rukhsar-laravel-active-route/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

Laravel Active Route
====================

[](#laravel-active-route)

#### v1.0

[](#v10)

Helper class for Laravel applications to get active class base on current route name.

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

[](#installation)

Install using composer

```
composer require rukhsar/laravel-active-route

```

Add below line to your service providers array in `config/app.php`

```
Rukhsar\ActiveRoute\ActiveRouteServiceProvider::class,
```

Add below line to your **aliases** array in `config/app.php`

```
'Active'    =>  Rukhsar\ActiveRoute\Facades\Active::class,
```

Publish config file using

```
php artisan vendor:publish --provider="Rukhsar\ActiveRoute\ActiveRouteServiceProvider" --tag="config"

```

### Config File

[](#config-file)

In `config/activeroute.php` you can modify the css active class which notmally `active` if you are using bootsrap.

```
return [

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

];
```

Usage
-----

[](#usage)

You can use this package in different ways like...

```
Active::route('route.name'); // Facade example
app('active')->route('route.name'); // Application container example
active_route('route.name'); // Helper function

// Wildcard exmaples

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

// Multiple Routes

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

You can also use custom blade directive in your blade templates.

```
@ifActiveRoute('route.name')
    True
@else
    False
@endif

```

### Practical use in application

[](#practical-use-in-application)

```

    Dashboard

```

---

This project is open-sourced software licensed under the [MIT License](https://opensource.org/licenses/MIT).

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

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

Total

4

Last Release

2999d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e6584707b3ee5236ec394a993c8eaed2aa58ed0b2a9a4ec2397a11b606cbfbdf?d=identicon)[Rukhsar](/maintainers/Rukhsar)

---

Top Contributors

[![Rukhsar](https://avatars.githubusercontent.com/u/9365770?v=4)](https://github.com/Rukhsar "Rukhsar (11 commits)")

### Embed Badge

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

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

PHPackages © 2026

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