title: routesAreCached() method in Laravel undefined
body: <p>Please help me out a bit. I'm trying to setup passport for my Laravel app by following the <a href="https://laravel.com/docs/9.x/passport#introduction" rel="nofollow noreferrer">official docs</a>. But i'm stuck at the step where I need to check before calling <code>Passport::routes()</code>. My vscode displayed an error saying</p>
  <blockquote>
  <p>undefined method: routesAreCached()</p>
  </blockquote>
  <p>even though when I traced back to the base abstract class ServiceProvider.php, the code there seems to be calling <code>$this-&gt;app-&gt;routesAreCached()</code> without any problems. Below is my App\Providers\AuthServiceProvider.php code.</p>
  <pre><code>&lt;?php
  
  namespace App\Providers;
  
  use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
  use Illuminate\Support\Facades\Gate;
  use Laravel\Passport\Passport;
  
  class AuthServiceProvider extends ServiceProvider
  {
      /**
       * The model to policy mappings for the application.
       *
       * @var array&lt;class-string, class-string&gt;
       */
      protected $policies = [
          // 'App\Models\Model' =&gt; 'App\Policies\ModelPolicy',
      ];
  
      /**
       * Register any authentication / authorization services.
       *
       * @return void
       */
      public function boot()
      {
          $this-&gt;registerPolicies();
  
          /**
           * This method will register the routes necessary to issue access tokens and revoke access tokens, clients, and personal access tokens:
           * 
           */
  
           if (! $this-&gt;app-&gt;routesAreCached()) {   // error at this line
              Passport::routes();
           }
  
      }
  }
  </code></pre>