title: Trying to understand Laravel Backpack Spatie permissions
body: <p>I have installed backpack 4 and Spatie.
  <a href="https://github.com/spatie/laravel-permission" rel="nofollow noreferrer">https://github.com/spatie/laravel-permission</a></p>
  
  <p>I have created 2 roles:
  Admin and Users in my back end admin panel(the CRUD that comes with Backpack).</p>
  
  <p>I have then added 2 permissions:
  1 called "read admin link"
  1 called "read user link"</p>
  
  <p>I have assigned the permissions to each role:
  read admin link = role of admin
  read user link = role of user</p>
  
  <p>I see the permissions correctly assigned to the roles inside the admin panel.</p>
  
  <p>Now on the left navbar, I would like to see 1 menu when logged as an admin or see another menu when logged as a user.</p>
  
  <p>But I cannot get it to work:</p>
  
  <pre><code>&lt;li&gt; 
  &lt;ul&gt;
  @if(auth()-&gt;backpack_user()-&gt;can('read admin link'))
  &lt;li class="nav-item"&gt;&lt;a class="nav-link" href=""&gt;&lt;i class="nav-icon fa fa-user"&gt;&lt;/i&gt; &lt;span&gt;Can only 
  be seen by admins&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  @endif
  @if(auth()-&gt;backpack_user()-&gt;can('read user link'))
  &lt;li class="nav-item"&gt;&lt;a class="nav-link" href=""&gt;&lt;i class="nav-icon fa fa-user"&gt;&lt;/i&gt; &lt;span&gt;Can only 
  be seen by users&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  @endif
  &lt;/ul&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>It seems that this permission checker(while logged in) : </p>
  
  <pre><code>@if(auth()-&gt;backpack_user()-&gt;can('xxxxxxxxxxx'))
  @endif
  </code></pre>
  
  <p>Cause this error:</p>
  
  <pre><code>Facade\Ignition\Exceptions\ViewException
  Method Illuminate\Auth\SessionGuard::backpack_user does not exist. (View: 
  C:\laragon\www\demo\resources\views\vendor\backpack\base\inc\sidebar_content.blade.php)
  </code></pre>
  
  <p>This is my base.php setup:</p>
  
  <pre><code>'middleware_class' =&gt; [
      App\Http\Middleware\CheckIfAdmin::class,
      \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
      // \Backpack\CRUD\app\Http\Middleware\UseBackpackAuthGuardInsteadOfDefaultAuthGuard::class,
  ],
  </code></pre>
  
  <p>Any idea why this is happening please?</p>
  
  <p>Thank you</p>