title: Laravel blade @can policy - string
body: <p>I am using Laravel 5.2. So I'm learning about how to deal with roles and permissions <a href="https://laravel.com/docs/5.1/authorization" rel="nofollow">Authorization</a>. Everything runs fine. I even made my own policy PostPolicy. </p>
  
  <p>And now to the problem. I load the $post data into the view in the PostsController which then loads in blade.</p>
  
  <p><strong>PostsController</strong>:</p>
  
  <pre><code>public function show($id)
  {
      $post = Post::find($id);
  
      return view('posts.show', compact('post'));
  }
  </code></pre>
  
  <p><strong>posts/show.blade.php</strong>:</p>
  
  <pre><code>@section('content')
  &lt;!-- begin --&gt;
  @can('hasRole', Auth::user())
      &lt;h1&gt;Displaying Admin content&lt;/h1&gt;
  @endcan
  
  @can('hasRole', Auth::user())
      &lt;h1&gt;Displaying moderator content&lt;/h1&gt;
  @endcan
  
  @can('hasRole', Auth::user())
      &lt;h1&gt;Displaying guest content&lt;/h1&gt;
  @endcan
  </code></pre>
  
  <p><strong>Policy</strong>: </p>
  
  <pre><code>  public function hasRole($user)
      {
          // just for test
          return true;
      }
  </code></pre>
  
  <p><strong>Now that returns all the content.</strong></p>
  
  <p>When I change the     <code>@can('hasRole', Auth::user())</code>
   from 
      Auth::user()  to a string, i.E.  </p>
  
  <pre><code>@can('hasRole', 'guest')
      &lt;h1&gt;Displaying guest content&lt;/h1&gt;
  @endcan
  </code></pre>
  
  <p>In this case it doesn't return anything. As I am new to Laravel, I really don't know it doesn't work. </p>