Enable user switching

This commit is contained in:
Deon George
2021-09-27 22:50:47 +10:00
parent fa97fbb0c1
commit ca666e456a
7 changed files with 123 additions and 4 deletions

View File

@@ -15,8 +15,15 @@
<ul class="float-end">
@auth
<li><a href="{{ url('settings') }}"><span>{{ Auth::user()->name }}</span></a></li>
<li><a href="{{ url('logout') }}"><span>Logout</span></a></li>
<li class="{{ Auth::user()->switched ? 'switched' : '' }}"><a href="{{ url('settings') }}"><span>{{ Auth::user()->name }}</span></a></li>
@if(Auth::user()->switched)
<li><a href="{{ url('admin/switch/stop') }}">
<span>Switch Back</span>
</a></li>
@else
<li><a href="{{ url('logout') }}"><span>Logout</span></a></li>
@endif
@endauth
@guest
<li><a href="{{ url('login') }}"><span>Login</span></a></li>