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.
Login page
<form role="form" action=" {{route('user.login')}}" method="POST">
<div class="form-group mb-3">
<div class="input-group input-group-alternative">
<div class="input-group-prepend">
<span class="input-group-text"><i class="ni ni-email-83"></i></span>
</div>
<input class="form-control" placeholder="User Id" name="user_id" type="text">
</div>
</div>
<div class="form-group">
<div class="input-group input-group-alternative">
<div class="input-group-prepend">
<span class="input-group-text"><i class="ni ni-lock-circle-open"></i></span>
</div>
<input class="form-control" placeholder="Password" name="password" type="password">
</div>
</div>
<div class="text-center">
<button type="submit" class="btn btn-primary my-4">Log in</button>
</div>
</form>
My database fields
id
user_id
user_name
password
type
role
remember_token
created_at
updated_at
by the way my remember_token id null always i don't know why.
changed in Illuminate\Foundation\Auth\AuthenticatesUsers
public function username()
{
return 'user_id';
}
web.php
Route::get('/login', 'UserController@login_form')->name('user.loin_form');
Route::post('/login', 'Auth\LoginController@login')->name('user.login');
what did i missed