Laravel's users table has a remember_token field. What is its function?
认证0级讲师
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_tokensave 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.
remember_token
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
Doesn’t that literally mean “remember me”…
That is, when the user logs in, for example, there is
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
Determine whether the user is logged in (including remember_me)
Please check (laravel 5.3) for details
Doesn’t that literally mean “remember me”…