-
Notifications
You must be signed in to change notification settings - Fork 406
/
nav.blade.php
59 lines (57 loc) · 2.92 KB
/
nav.blade.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<nav class="navbar navbar-default navbar-inverse">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle Navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Laravel</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="{{ (Request::is('/') ? 'active' : '') }}">
<a href="{{ url('') }}"><i class="fa fa-home"></i> Home</a>
</li>
<li class="{{ (Request::is('articles') ? 'active' : '') }}">
<a href="{{ url('articles') }}">Articles</a>
</li>
<li class="{{ (Request::is('about') ? 'active' : '') }}">
<a href="{{ url('about') }}">About</a>
</li>
<li class="{{ (Request::is('contact') ? 'active' : '') }}">
<a href="{{ url('contact') }}">Contact</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
@if (Auth::guest())
<li class="{{ (Request::is('auth/login') ? 'active' : '') }}"><a href="{{ url('auth/login') }}"><i
class="fa fa-sign-in"></i> Login</a></li>
<li class="{{ (Request::is('auth/register') ? 'active' : '') }}"><a
href="{{ url('auth/register') }}">Register</a></li>
@else
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
aria-expanded="false"><i class="fa fa-user"></i> {{ Auth::user()->name }} <i
class="fa fa-caret-down"></i></a>
<ul class="dropdown-menu" role="menu">
@if(Auth::check())
@if(Auth::user()->admin==1)
<li>
<a href="{{ url('admin/dashboard') }}"><i class="fa fa-tachometer"></i> Admin Dashboard</a>
</li>
@endif
<li role="presentation" class="divider"></li>
@endif
<li>
<a href="{{ url('auth/logout') }}"><i class="fa fa-sign-out"></i> Logout</a>
</li>
</ul>
</li>
@endif
</ul>
</div>
</div>
</nav>