I'm not sure if this'll help, but I use
{{ Request::segment(2) == '/user' }}
or something similar
Example of my navigation:
<ul class="nav nav-justified collapse navbar-collapse">
<li {{ Request::segment(1) == '' ? 'class="active"' : '' }}>{{ HTML::link('/', 'Home') }}</li>
<li>{{ HTML::link('/', 'What Is Nexus?') }}</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">What We Do <span class="caret"></span></a>
<ul class="dropdown-menu">
<li>{{ HTML::link('/', 'Lectures') }}</li>
<li>{{ HTML::link('/', 'Tutoring') }}</li>
</ul>
</li>
<li class="dropdown {{ Request::segment(2) == 'screenshots' || Request::segment(1) == 'resources' ? 'active' : '' }}">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Resources <span class="caret"></span></a>
<ul class="dropdown-menu">
<li>{{ HTML::link('/resources', 'Helpful Links') }}</li>
<li {{ Request::segment(2) == 'screenshots' ? 'class="active"' : '' }}>{{ HTML::link('/resources/screenshots', 'Screenshots') }}</li>
</ul>
</li>
<li>{{ HTML::link('/', 'Get In Touch') }}</li>
</ul>
Thanks, Ended up using something similar.
I had taught there would be some method to unmatch a route.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community