Created
May 5, 2016 17:38
-
-
Save yoosuf/fe71302265b2272e7c62a4e47e8eede6 to your computer and use it in GitHub Desktop.
Setting Bootstrap navbar active class in Laravel 5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul class="nav nav-second-level"> | |
<li class="{{ Request::segment(1) === 'programs' ? 'active' : null }}"> | |
<a href="{{ url('programs' )}}" ></i> Programs</a> | |
</li> | |
<li class="{{ Request::segment(1) === 'beneficiaries' ? 'active' : null }}"> | |
<a href="{{url('beneficiaries')}}"> Beneficiaries</a> | |
</li> | |
<li class="{{ Request::segment(1) === 'indicators' ? 'active' : null }}"> | |
<a href="{{url('indicators')}}"> Indicators</a> | |
</li> | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment