-
-
Save miftahafina/e3b917e93d7dfc754210 to your computer and use it in GitHub Desktop.
This file contains 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
<!-- Example on how to set class="active" on active navigation links --> | |
<!-- These links will always be visible --> | |
<li class="{{ Request::is( 'home') ? 'active' : '' }}"> | |
<a href="{{ URL::to( 'home') }}"> | |
Home | |
</a> | |
</li> | |
<li class="{{ Request::is( 'gallery') ? 'active' : '' }}"> | |
<a href="{{ URL::to( 'gallery') }}"> | |
Gallery | |
</a> | |
</li> | |
<!-- Show link to 'account' if authed --> | |
@if ( Auth::check() ) | |
<li class="{{ Request::is( 'account') ? 'active' : '' }}"> | |
<a href="{{ URL::to( 'account') }}"> | |
Account | |
</a> | |
</li> | |
@endif | |
<!-- Login/Logout depending on auth state --> | |
<li class="{{ Request::is( 'account/login') ? 'active' : '' }}"> | |
@if ( Auth::guest() ) | |
{{ HTML::link('account/login', 'Login') }} | |
@else | |
{{ HTML::link('account/logout', 'Logout') }} | |
@endif | |
</li> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment