Add $user (authed user) to views

This commit is contained in:
Deon George
2021-09-28 00:21:21 +10:00
parent ca666e456a
commit 2c406ba3e9
7 changed files with 59 additions and 8 deletions

View File

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