如何清除 Laravel 中的登录尝试?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32360335/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to clear Login Attempts in Laravel?
提问by user3407278
I'm using Laravel's Auth Throttling feature and it is working correctly but I would like to know how to clear the login attempts for that email? http://laravel.com/docs/5.1/authentication#authentication-throttling
我正在使用 Laravel 的身份验证限制功能,它工作正常,但我想知道如何清除该电子邮件的登录尝试? http://laravel.com/docs/5.1/authentication#authentication-throttling
currently the lockout time is at "Too many login attempts. Please try again in 5418 seconds"
当前锁定时间为“登录尝试次数过多。请在 5418 秒后重试”
采纳答案by EricMakesStuff
In your controller that includes the ThrottlesLogins
trait, create a new route handler method:
在包含ThrottlesLogins
trait 的控制器中,创建一个新的路由处理程序方法:
public function clearThrottle(Request $request) {
$this->clearLoginAttempts($request);
// Forward elsewhere or display a view
}
回答by buzdykg
run this in the console php artisan cache:clear
and you're good to go
在控制台中运行它,php artisan cache:clear
你就可以开始了