title: Laravel Auth::user() Assign Custom User Model
body: <p>I'm using my own User model class that is not derived from Eloquent. I use a database driver for authentification, which works fine. </p>
  
  <p>However, Auth::user() returns a class of type GenericUser. Is there a way to assign a custom user model to the Auth class?</p>
  
  <p>I tried auth config...</p>
  
  <pre><code>'users' =&gt; [
      'driver' =&gt; 'database',
      'table' =&gt; 'users',
      'model' =&gt; App\Models\User::class
  ],
  </code></pre>
  
  <p>But it doesn't work. Perhaps this functionality doesn't exist.</p>
  
  <p><strong>Edit:</strong> </p>
  
  <p>I don't want to use Active record, I have a Data Mapper package for that. My user model looks like this...</p>
  
  <pre><code>&lt;?php
  
  class User extends Model
  {
      use Notifiable, HasApiTokens, CanResetPassword;
      use Authenticatable, Authorizable;
  
      protected $attributes = [
          'id' =&gt; null, 'roleId' =&gt; null,
          'email' =&gt; null, 'phone' =&gt; null,
          'firstName' =&gt; null, 'lastName' =&gt; null,
          'password' =&gt; null, 'rememberToken' =&gt; null,
          'registrationLocation' =&gt; null,
          'data' =&gt; null,
          'verified' =&gt; 0,
          'createdAt' =&gt; null, 'updatedAt' =&gt; null,
      ];
  
      public function __construct(array $attributes = [])
      {
          $this-&gt;fill($attributes);
      }
  }
  </code></pre>
  
  <p>Model is extended from the data mapper package's class Entity. </p>