2017 © Pedro Peláez
 

library menu-active-check

image

filipac/menu-active-check

  • Tuesday, February 24, 2015
  • by filipac
  • Repository
  • 1 Watchers
  • 0 Stars
  • 21 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

<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., (*1)

I wanted to have this for further Laravel projects., (*2)

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, (*3)

'Filipac\MenuActiveCheck\MenuActiveCheckServiceProvider',

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

The Versions

24/02 2015

dev-master

9999999-dev

  Sources   Download

The Requires

 

by Avatar filipac

laravel

24/02 2015

1.2.2

1.2.2.0

  Sources   Download

The Requires

 

by Avatar filipac

laravel

24/02 2015

1.2.1

1.2.1.0

  Sources   Download

The Requires

 

by Avatar filipac

laravel

24/02 2015

1.2

1.2.0.0

  Sources   Download

The Requires

 

by Avatar filipac

laravel

24/02 2015

1.1.1

1.1.1.0

  Sources   Download

The Requires

 

by Avatar filipac

laravel

08/09 2014

1.1

1.1.0.0

  Sources   Download

The Requires

 

by Avatar filipac

laravel

31/08 2014

1.0

1.0.0.0

  Sources   Download

The Requires

 

by Avatar filipac

laravel