title: Method Illuminate\Auth\RequestGuard::attempt does not exist
body: <p>I am new to both laravel and lumen.
  I was creating a login api with oauth2.0 in lumen 5.6, i have installed passport and generated token.
  Below is my login controller function and it is working fine. It returns token.</p>
  
  <pre><code>namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  use App\Http\Controllers\Controller;
  use Illuminate\Support\Facades\Route;
  //use Illuminate\Support\Facades\DB;
  use App\User;
  use Auth;
  
  public function login(Request $request)
          {
              global $app;    
              $proxy = Request::create(
                  '/oauth/token',
                  'post',
                  [
                      'grant_type'    =&gt;  env('API_GRAND_TYPE'),
                      'client_id'     =&gt;  env('API_CLIENT_ID'),
                      'client_secret' =&gt;  env('API_CLIENT_SECRET'),
                      'username'      =&gt;  $request-&gt;username,
                      'password'      =&gt;  $request-&gt;password,
                  ]
  
              );
              return $app-&gt;dispatch($proxy);
          }  
  </code></pre>
  
  <p>Since i have to check user status apart from username and password, i need to check the user credential first. so i do like this.</p>
  
  <pre><code>public function login(Request $request)
  {
  
      $credentials = $request-&gt;only('username', 'password');
  
      if (Auth::attempt($credentials)) {
          return ['result' =&gt; 'ok'];
      }
  
      return ['result' =&gt; 'not ok'];
  }
  
  Here i am getting this error.
  Method Illuminate\Auth\RequestGuard::attempt does not exist.
  
  So i tried Auth::check instead of Auth::attempt.
  Now there is no error but it always return false even though the credentials are valid.
  
  I searched a lot for a solution but i didn't get.
  </code></pre>