title: Call to undefined method Illuminate\Auth\TokenGuard::attempt()
body: <p>I'm getting this error:</p>
  
  <blockquote>
    <p>Call to undefined method Illuminate\Auth\TokenGuard::attempt()</p>
  </blockquote>
  
  <p>From this code:</p>
  
  <pre><code>if(Auth::guard('admin')-&gt;attempt(['email' =&gt; $request-&gt;email, 'password' =&gt; $request-&gt;password], $request-&gt;remember)){
              return redirect()-&gt;intended(route('admin.dashboard'));
          }else{
  </code></pre>
  
  <p>I have imported <code>Illuminate\Support\Facades\Auth</code> <a href="https://laravel.com/docs/5.4/authentication#authenticating-users" rel="nofollow noreferrer">as the docs suggest</a></p>
  
  <p>My <code>auth.php</code> may help</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; 'token',
              'provider' =&gt; 'users',
          ],
          'admin' =&gt; [
              'driver' =&gt; 'session',
              'provider' =&gt; 'admins',
          ],
          'admin-api' =&gt; [
              'driver' =&gt; 'token',
              'provider' =&gt; 'admins',
          ],
      ],
      'providers' =&gt; [
          'users' =&gt; [
              'driver' =&gt; 'eloquent',
              'model' =&gt; App\User::class,
          ],
          'admins' =&gt; [
              'driver' =&gt; 'eloquent',
              'model' =&gt; App\Admin::class,
          ],
      ],
      'passwords' =&gt; [
          'users' =&gt; [
              'provider' =&gt; 'users',
              'table' =&gt; 'password_resets',
              'expire' =&gt; 60,
          ],
          'admins' =&gt; [
              'provider' =&gt; 'admins',
              'table' =&gt; 'password_resets',
              'expire' =&gt; 15,
          ],
      ],
  ];
  </code></pre>