title: Undefined type Laravel\Passport\HasApiTokens
body: <p>I followed the <a href="https://laravel.com/docs/7.x/passport" rel="nofollow noreferrer">Laravel docs</a> to install the Passport service in Laravel. However when I want to use HasApiToken in my user model I get the error Undefined type 'Laravel\Passport\HasApiTokens'.</p>
  <p>User.php:</p>
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  
  namespace App;
  
  use Illuminate\Contracts\Auth\MustVerifyEmail;
  use Illuminate\Foundation\Auth\User as Authenticatable;
  use Illuminate\Notifications\Notifiable;
  use Laravel\Passport\HasApiTokens;
  
  class User extends Authenticatable
  {
      use HasApiTokens, Notifiable;
  </code></pre>
  
  <p>Composer.json</p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;name&quot;: &quot;laravel/laravel&quot;,
      &quot;type&quot;: &quot;project&quot;,
      &quot;description&quot;: &quot;The Laravel Framework.&quot;,
      &quot;keywords&quot;: [
          &quot;framework&quot;,
          &quot;laravel&quot;
      ],
      &quot;license&quot;: &quot;MIT&quot;,
      &quot;require&quot;: {
          &quot;php&quot;: &quot;^7.2.5&quot;,
          &quot;fideloper/proxy&quot;: &quot;^4.2&quot;,
          &quot;fruitcake/laravel-cors&quot;: &quot;^1.0&quot;,
          &quot;guzzlehttp/guzzle&quot;: &quot;^6.3&quot;,
          &quot;laravel/framework&quot;: &quot;^7.0&quot;,
          &quot;laravel/passport&quot;: &quot;^8.4&quot;,
          &quot;laravel/tinker&quot;: &quot;^2.0&quot;,
          &quot;laravel/ui&quot;: &quot;^2.0&quot;
      },
  </code></pre>
  <p>Why am I getting this error?</p>