title: Laravel/Passport get guard user id
body: <p>I using <code>passport</code> and I want to use for multiple <code>auth</code> so I done this by this <a href="https://stackoverflow.com/a/57379714/9158178">topic</a> , just I use name as <code>agent</code> instead of <code>admin</code>, what I trying to do now is get admin id.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>   'providers' =&gt; [
          'users' =&gt; [
              'driver' =&gt; 'eloquent',
              'model' =&gt; App\User::class,
          ],
          'agents' =&gt; [
              'driver' =&gt; 'eloquent',
              'model' =&gt; App\Agent::class,
          ],
      ],
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>public function handle($request, Closure $next)
  {
      config(['auth.guards.api.provider' =&gt; 'agents']);
      return $next($request);
  }
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>Route::group(['middleware' =&gt; ['auth.agent']], function() {
  </code></pre>
  
  <p>So for getting <code>id</code> I tried:</p>
  
  <pre><code>return Auth::guard('Agent')-&gt;id;
  </code></pre>
  
  <p>Also with these names <code>agent</code> <code>agents</code> <code>Agents</code></p>
  
  <p>It return me a error:</p>
  
  <blockquote>
    <p>Auth guard [Agents] is not defined</p>
  </blockquote>
  
  <p>Sorry, I'm new to Laravel, any idea?</p>
  
  <p>Edit: I also tried </p>
  
  <pre><code>php artisan config:clear  
  php artisan config:cache
  </code></pre>