diff --git a/src/Middleware/Throttle.php b/src/Middleware/Throttle.php index cf26e56..c4282aa 100644 --- a/src/Middleware/Throttle.php +++ b/src/Middleware/Throttle.php @@ -35,10 +35,13 @@ public function handle($request, Closure $next) return $next($request); } - protected function getToManyAttemptsMessage() - { - return Lang::has('auth.to_many_attempts') - ? trans('auth.to_many_attempts') - : 'To many attempts!'; + protected function getToManyAttemptsMessage() { + $seconds = RateLimiter::availableIn('login-tries-' . Admin::guardName()); + + $message = Lang::has('auth.throttle') + ? trans('auth.throttle', ['seconds' => $seconds]) + : "Too many login attempts. Please try again in " . $seconds . " seconds."; + + return $message; } }