title: how to implement multiauth in laravel passport
body: <p>I have two users admin/user i want to authenticate this two users for api,
  it is working for one user but its not working for admin </p>
  
  <p>see what i have tried
  in admin controller</p>
  
  <pre><code>public function login(Request $request){
  
  //        $res=;
     // dd ($res);
       if(Auth::guard('admin')-&gt;attempt(['email' =&gt;  $request-&gt;email, 'password' =&gt;  $request-&gt;password]))
      {
  
    // if successful, then redirect to their intended location
  
  
          $user = auth()-&gt;guard('admin')-&gt;user();
          $success['token'] =  $user-&gt;createToken('admin')-&gt;accessToken;
          return response()-&gt;json(['success' =&gt; $success], $this-&gt;successStatus);
      }
      else{
          return response()-&gt;json(['error'=&gt;'Unauthorised','email'=&gt; $request-&gt;email,'password'=&gt; $request-&gt;password], 401);
      }
  }
  </code></pre>
  
  <p>and in api.php</p>
  
  <pre><code>Route::prefix('admin')-&gt;group(function () {
  
  Route::post('login', 'API\Admin\AdminController@login')-&gt;name('admin.login');
  Route::post('register', 'API\Admin\AdminController@register')-&gt;name('admin.register');
  
  Route::group(['middleware' =&gt; 'auth:admin-api'], function(){
   Route::post('get-details', 'API\Admin\AdminController@getDetails');
  });
  
  
  });
  </code></pre>
  
  <p>When i try to call attempt function for admin its giving me error </p>
  
  <blockquote>
    <p>BadMethodCallException
    Method Illuminate\Auth\RequestGuard::attempt does not exist.</p>
  </blockquote>
  
  <p>can you please share your ideas over how to do multiauth in laravel/passport</p>