定制 filipac/menu-active-check 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

filipac/menu-active-check

Composer 安装命令:

composer require filipac/menu-active-check

包简介

关键字:

README 文档

README

I had the following scenario: In a bootstrap admin theme I wanted the items in the Menu to pe marked as ACTIVE if I was on a certain controller. I had to write a lot of code everytime so i made a blade tag for quick access to the rule. Example how to use:

<li class="{@checkActive Dashboard|active}">
                      <a href="{{URL::to('/admin')}}"  >
                        <i class="fa fa-dashboard icon">
                          <b class="bg-danger"></b>
                        </i>
                        <span>@lang('admin.menu.dashboard')
                        </span>
                      </a>
                    </li>

Explanation: if the current controller is DashboardController the script will echo "active" so that the menu highlights. You can replace active with any class you want to add to the active menu items. This is a quick and rough package so if you want to make impovements, fork commit & merge request.

I wanted to have this for further Laravel projects.

Installation: Add "filipac/menu-active-check": "~1.0" to the require section of composer.json Run composer update In /app/config/app.php add the following to the end of providers array

'Filipac\MenuActiveCheck\MenuActiveCheckServiceProvider',

You are done, now you can use {@checkActive ControllerName|css-active-class} in your blade files!

统计信息

  • 总下载量: 30
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2014-08-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固