title: Trying to login with custom field "user_id" in laravel
body: <p>I am trying to login with a custom field called "user_id" but it is not working. I am getting page expired error. Please help. </p>
  
  <p>Login page</p>
  
  <pre><code>&lt;form role="form" action=" {{route('user.login')}}" method="POST"&gt;
                  &lt;div class="form-group mb-3"&gt;
                    &lt;div class="input-group input-group-alternative"&gt;
                      &lt;div class="input-group-prepend"&gt;
                        &lt;span class="input-group-text"&gt;&lt;i class="ni ni-email-83"&gt;&lt;/i&gt;&lt;/span&gt;
                      &lt;/div&gt;
                      &lt;input class="form-control" placeholder="User Id" name="user_id" type="text"&gt;
                    &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="form-group"&gt;
                    &lt;div class="input-group input-group-alternative"&gt;
                      &lt;div class="input-group-prepend"&gt;
                        &lt;span class="input-group-text"&gt;&lt;i class="ni ni-lock-circle-open"&gt;&lt;/i&gt;&lt;/span&gt;
                      &lt;/div&gt;
                      &lt;input class="form-control" placeholder="Password" name="password" type="password"&gt;
                    &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="text-center"&gt;
                    &lt;button type="submit" class="btn btn-primary my-4"&gt;Log in&lt;/button&gt;
                  &lt;/div&gt;
                &lt;/form&gt;
  </code></pre>
  
  <p>My database fields
  <code>id</code>
  <code>user_id</code>
  <code>user_name</code>
  <code>password</code>
  <code>type</code>
  <code>role</code>
  <code>remember_token</code>
  <code>created_at</code>
  <code>updated_at</code></p>
  
  <p>by the way my remember_token id null always i don't know why.</p>
  
  <p>changed in Illuminate\Foundation\Auth\AuthenticatesUsers</p>
  
  <pre><code>public function username()
      {
          return 'user_id';
      }
  </code></pre>
  
  <p>web.php</p>
  
  <pre><code>Route::get('/login', 'UserController@login_form')-&gt;name('user.loin_form');
  Route::post('/login', 'Auth\LoginController@login')-&gt;name('user.login');
  </code></pre>
  
  <p>what did i missed</p>