Skip to content

Instantly share code, notes, and snippets.

@yoosuf
Created May 5, 2016 17:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoosuf/fe71302265b2272e7c62a4e47e8eede6 to your computer and use it in GitHub Desktop.
Save yoosuf/fe71302265b2272e7c62a4e47e8eede6 to your computer and use it in GitHub Desktop.
Setting Bootstrap navbar active class in Laravel 5
<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