https://github.com/lloricode/active
The helper class for Laravel applications to get active class base on current route
https://github.com/lloricode/active
Last synced: 6 months ago
JSON representation
The helper class for Laravel applications to get active class base on current route
- Host: GitHub
- URL: https://github.com/lloricode/active
- Owner: lloricode
- License: mit
- Fork: true (letrunghieu/active)
- Created: 2019-10-13T23:04:08.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-17T21:09:06.000Z (almost 7 years ago)
- Last Synced: 2025-08-16T13:20:52.237Z (11 months ago)
- Language: PHP
- Homepage: https://www.hieule.info/tag/laravel-active/
- Size: 87.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Active for Laravel
======
[](https://travis-ci.org/letrunghieu/active)
[](https://packagist.org/packages/hieu-le/active)
[](https://codeclimate.com/github/letrunghieu/active)
[](https://codeclimate.com/github/letrunghieu/active/coverage)
[](https://packagist.org/packages/hieu-le/active)
[](https://packagist.org/packages/hieu-le/active)
The helper class for Laravel applications to get active class base on current url.
This README file is written for the new `4.x` version of this package, which is compatible with the Laravel 6 only.
* If you are using Laravel 4, see the [`1.x` versions](https://github.com/letrunghieu/active/tree/support/1.x).
* If you are using Laravel 5, see the [`3.x` versions](https://github.com/letrunghieu/active/tree/support/3.x)
## 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`
```php
HieuLe\Active\ActiveServiceProvider::class,
```
Append this line to your `aliases` array in `config/app.php`
```php
'Active' => HieuLe\Active\Facades\Active::class,
```
## Usage
See: [How to use Active](https://www.hieule.info/?p=377)
## Changelog:
* 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