Laravel's users table has a remember_token field. What is its function?
天蓬老师2017-05-16 16:52:32
That is, when the user logs in, for example, there is
账号 <inout type="text" name="username">
密码 <inout type="password" name="password">
<input type="checkbox" value="1" name="remember_me" > 保存登录
When "Save Login" is selected, according to the Login interface below, you can remember_token
save a random Token in Cookie and database users. You do not need to re-enter your account and password to log in for a period of time in the future.
Login interface
Auth::guard()->attempt(['username' => 'admin', 'password' => '123456'], $request->input('remember_me')); //第二个参数TRUE则保存
Determine whether the user is logged in (including remember_me)
Auth::guard()->check();
Please check (laravel 5.3) for details
.\vendor\laravel\framework\src\Illuminate\Auth\Guard.php