title: Laravel 5 with entrust - hasRole not working
body: <p>I have a logged in user and the code here works:</p>
  
  <pre><code>@if( Auth::check() )
  Logged in as: {{ Auth::user()-&gt;firstname }} {{ Auth::user()-&gt;lastname  }}
  @endif
  </code></pre>
  
  <p>I'm using zizaco/entrust and it's all working. I've created roles and permissions and given my user the admin role which has administrative permission.</p>
  
  <p>So why doesn't this work:</p>
  
  <pre><code>$user = Auth::user();
  print_r($user-&gt;hasRole('admin'));
  </code></pre>
  
  <p>If I print_r the $user I can see that the Auth user is loaded, but hasRole is not working. I was just testing this within the blade template at the moment but tried it in the Controller with the same result. My error is:</p>
  
  <pre><code>BadMethodCallException in Builder.php line 1992:
  Call to undefined method Illuminate\Database\Query\Builder::hasRole()
  </code></pre>
  
  <p>My user model:</p>
  
  <pre><code>namespace App\Models;
  
  use Illuminate\Database\Eloquent\Model;
  use Illuminate\Database\Eloquent\SoftDeletes;
  use Zizaco\Entrust\Traits\EntrustUserTrait;
  
  class User extends Model {
    use EntrustUserTrait;
  
     protected $table = 'users';
     public $timestamps = true;
  
     use SoftDeletes;
  
     protected $dates = ['deleted_at'];
  
  }
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I realized hasRole works for me when I look up the user this way (returns App\Models\User Object):</p>
  
  <pre><code>$user = \App\Models\User::find( \Auth::user()-&gt;id );
  </code></pre>
  
  <p>but NOT when I find the user this way (returns App\User Object ):</p>
  
  <pre><code>$user = \Auth::user();
  </code></pre>
  
  <p>I rather would have thought it would work the other way, when I pull up the App\User I'd have access to hasRole but not necessarily when I search for a user. I thought hasRole would work right from the Auth::user() without having to lookup the user with the user model...???</p>