This repository has been archived by the owner on Mar 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
view.blade.php
54 lines (37 loc) · 1.44 KB
/
view.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
<ul class="nav navbar-nav navbar-right">
@auth
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
Menu
</a>
<ul class="dropdown-menu">
@foreach($nav['auth']->getItems() as $nav)
@if($nav->getName() == 'logout')
<li>
<a href="{{ $nav->getUrl() }}" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
{{ $nav->getTitle() }}
</a>
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
{{ csrf_field() }}
</form>
</li>
@else
<li>
<a href="{{ $nav->getUrl() }}">
{{ $nav->getTitle() }}
</a>
</li>
@endif
@endforeach
</ul>
</li>
@else
@foreach($nav['guest']->getItems() as $item)
<li@if($item->isMatch()){{ 'class="active"' }}@endif>
<a href="{{ $item->getUrl() }}">
{{ $item->getTitle() }}
</a>
</li>
@endforeach
@endauth
</ul>