Skip to content

Commit

Permalink
Merge pull request #85 from nicolaferrara82/1.x
Browse files Browse the repository at this point in the history
Update LoginRateLimiter.php
  • Loading branch information
taylorotwell authored Sep 23, 2020
2 parents 09c6b71 + f31b4b9 commit 9661c0c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/LoginRateLimiter.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ public function __construct(RateLimiter $limiter)
$this->limiter = $limiter;
}

/**
* Get the number of attempts for the given key.
*
* @param \Illuminate\Http\Request $request
* @return mixed
*/
public function attempts(Request $request)
{
return $this->limiter->attempts($this->throttleKey($request));
}

/**
* Determine if the user has too many failed login attempts.
*
Expand Down

0 comments on commit 9661c0c

Please sign in to comment.