title: Having problem in laravel passport multiple authentication
body: <p>I am trying to apply multiple authentication to laravel using passport authentication passport. But its showing every time for admin authentication. I tried many times, but not able to authentication. Please help.</p>
  <p>This is my admin class</p>
  <pre><code>class Admin extends Authenticatable
  {
      use Notifiable, HasApiTokens;
  
      protected $guard = 'admin';
  
      /**
       * The attributes that are mass assignable.
       *
       * @var array
       */
      protected $fillable = [
          'name', 'email', 'password',
      ];
  
      /**
       * The attributes that should be hidden for arrays.
       *
       * @var array
       */
      protected $hidden = [
          'password', 'remember_token',
      ];
  
      /**
       * The attributes that should be cast to native types.
       *
       * @var array
       */
      protected $casts = [
          'email_verified_at' =&gt; 'datetime',
      ];
  }
  </code></pre>
  <p>This is auth.php file</p>
  <pre><code>&lt;?php
  
  return [
  
      'defaults' =&gt; [
          'guard' =&gt; 'web',
          'passwords' =&gt; 'users',
      ],
  
      'guards' =&gt; [
          'web' =&gt; [
              'driver' =&gt; 'session',
              'provider' =&gt; 'users',
          ],
  
          'api' =&gt; [
              'driver' =&gt; 'passport',
              'provider' =&gt; 'users',
              'hash' =&gt; false,
          ],
  
          'admin-api' =&gt; [
              'driver' =&gt; 'passport',
              'provider' =&gt; 'admin',
          ],
  
          'admin' =&gt; [
              'driver' =&gt; 'session',
              'provider' =&gt; 'admin',
          ],
      ],
  
      'providers' =&gt; [
          'users' =&gt; [
              'driver' =&gt; 'eloquent',
              'model' =&gt; App\User::class,
          ],
  
          'admin' =&gt; [
              'driver' =&gt; 'eloquent',
              'model' =&gt; App\Admin::class,
          ],
  
          // 'users' =&gt; [
          //     'driver' =&gt; 'database',
          //     'table' =&gt; 'users',
          // ],
      ],
  
  
      'passwords' =&gt; [
          'users' =&gt; [
              'provider' =&gt; 'users',
              'table' =&gt; 'password_resets',
              'expire' =&gt; 60,
              'throttle' =&gt; 60,
          ],
  
          'admin' =&gt; [
              'provider' =&gt; 'admin',
              'table' =&gt; 'password_resets',
              'expire' =&gt; 60,
              'throttle' =&gt; 60,
          ],
      ],
  </code></pre>
  <p>This is api.php</p>
  <pre><code>Route::post('loginEmp', 'AdminController@login');
  Route::post('registerEmp', 'AdminController@register');
  Route::post('detailsEmp', 'AdminController@details')-&gt;middleware('auth:admin-api');
  </code></pre>
  <p>This is admin controller</p>
  <pre><code>class AdminController extends Controller
  {
      public $successStatus = 200;
      /**
       * login api
       *
       * @return \Illuminate\Http\JsonResponse
       */
      public function login(){
          if(Auth::guard('admin')-&gt;attempt(['email' =&gt; request('email'), 'password' =&gt; request('password')])){
              $user = Auth::guard('admin');
              $success['token'] =  $user-&gt;createToken('MyApp')-&gt; accessToken;
              return response()-&gt;json(['success' =&gt; $success], $this-&gt; successStatus);
          }
          else{
              return response()-&gt;json(['error'=&gt;'Unauthorised'], 401);
          }
      }
  
      /**
       * Register api
       *
       * @return \Illuminate\Http\JsonResponse
       */
      public function register(Request $request)
      {
          $validator = Validator::make($request-&gt;all(), [
              'name' =&gt; 'required',
              'email' =&gt; 'required|email',
              'password' =&gt; 'required',
              'c_password' =&gt; 'required|same:password',
          ]);
          if ($validator-&gt;fails()) {
              return response()-&gt;json(['error'=&gt;$validator-&gt;errors()], 401);
          }
          $input = $request-&gt;all();
          $input['password'] = bcrypt($input['password']);
          $user = Admin::create($input);
          $success['token'] =  $user-&gt;createToken('MyApp')-&gt; accessToken;
          $success['name'] =  $user-&gt;name;
          return response()-&gt;json(['success'=&gt;$success], $this-&gt; successStatus);
      }
  
      /**
       * details api
       *
       * @return \Illuminate\Http\JsonResponse
       */
      public function details()
      {
          $user = Auth::guard('admin-api');
          return response()-&gt;json(['success' =&gt; $user], $this-&gt; successStatus);
      }
  }
  </code></pre>
  <p>Error I am getting while logging in</p>
  <pre><code>BadMethodCallException: Method Illuminate\Auth\SessionGuard::createToken does
   not exist. in file C:\xampp\htdocs\MultiAuthApi\vendor\laravel\framework
  \src\Illuminate\Support\Traits\Macroable.php on line 103
  </code></pre>