Skip to content

Commit 14a3d5d

Browse files
author
ahmadhuss
committed
refactor: admin.blade.php file
1 parent 8ba1e94 commit 14a3d5d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

resources/views/layouts/admin.blade.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,14 @@
3939
<!-- Right Side Of Navbar -->
4040
<ul class="navbar-nav ml-auto">
4141
<!-- Authentication Links -->
42-
@guest
43-
<li class="nav-item">
44-
<a class="nav-link" href="{{ route('admin.login') }}">{{ __('Admin Login') }}</a>
45-
</li>
46-
@else
42+
@if (auth()->guard('admin')->check())
4743
<li class="nav-item dropdown">
4844
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
49-
{{ Auth::user()->name }}
45+
{{ auth()->user()->name }}
5046
</a>
5147

5248
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
53-
<a class="dropdown-item" href="{{ route('logout') }}"
49+
<a class="dropdown-item" href="{{ route('admin.logout') }}"
5450
onclick="event.preventDefault();
5551
document.getElementById('logout-form').submit();">
5652
{{ __('Logout') }}
@@ -61,7 +57,11 @@
6157
</form>
6258
</div>
6359
</li>
64-
@endguest
60+
@else
61+
<li class="nav-item">
62+
<a class="nav-link" href="{{ route('admin.login') }}">{{ __('Admin Login') }}</a>
63+
</li>
64+
@endif
6565
</ul>
6666
</div>
6767
</div>

0 commit comments

Comments
 (0)