thanhtut/easy-active

为Laravel提供HTML标记中的活动类

dev-master 2018-11-22 06:05 UTC

This package is auto-updated.

Last update: 2024-09-22 20:12:32 UTC


README

Active是一个用于Laravel的辅助包,它使得在HTML标记中提供活动类变得简单。

安装

使用 composer 安装

composer require thanhtut/easy-active dev-master

并在config/app.php中添加服务提供者

'providers' => [
    ........,
    Thanhtut\EasyActive\EasyActiveServiceProvider::class,
]
'aliases' => [
    ........,
   'Active' => Thanhtut\EasyActive\Active::class,
]

用法

{{Active::is_active('home')}} // https://:8000/home
<a href="/home" class="{{Active::is_active('home')}}" >Home</a>