Add $user (authed user) to views
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
<dl>
|
||||
<dt>Expore Networks</dt>
|
||||
@foreach (\App\Models\Domain::active()
|
||||
->when(! \Illuminate\Support\Facades\Auth::check(),function($query) { return $query->public(); })
|
||||
->when((! $user),function($query) { return $query->public(); })
|
||||
->orderBy('name')->get() as $o)
|
||||
<dd><a href="{{ url('network',['id'=>$o->id]) }}" title="{{ $o->description }}">{{ $o->name }}</a></dd>
|
||||
@endforeach
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user