Checking which `guard` is loggedin
<p>I have a multiauth laravel 5.2 app, with the fallowing guards defined on <code>config/auth.php</code>:</p>

<pre><code>...
'admin' =&gt; [
    'driver' =&gt; 'session',
    'provider' =&gt; 'admin',
],
'user' =&gt; [
    'driver' =&gt; 'session',
    'provider' =&gt; 'user',
],
...
</code></pre>

<p>So, <code>admin</code> and <code>user</code>.</p>

<p>The problem resides in the view layer, since this two loggedin guards share some views, ex:</p>

<pre><code>Hello {{Auth::guard('admin')-&gt;user()-&gt;name}}
</code></pre>

<p>In this case the guard is hardcoded into the view to be always <code>admin</code> (it gives error when loggedin guard is <code>user</code>), but, to avoid have to do another equal view just for this little change, I would like have it dinamic, something like:</p>

<pre><code>Hello {{Auth::guard(&lt;LOGGEDIN GUARD&gt;)-&gt;user()-&gt;name}}
</code></pre>

<p>PS: I know that this could be achieved getting the corresponding url segment, ex: <code>www.site.com/pt/user/dasboard</code> which in the case it would be segment 2, but this way the app would lose scalability, since in the future the corresponding segment may not be the same (2 in the example above)</p>