System\Classes\RateLimiter
Overview
RateLimiter prevents too many attempts at logging in
Protected Properties
protected string $throttleKey
protected Illuminate\Cache\RateLimiter $limiter
limiter instance
protected Illuminate\Http\Request $request
request instance
Public Methods
public __construct()
public __construct($throttleKey): void
__construct a new login rate limiter instance.
public attempts()
public attempts(): void
attempts gets the number of attempts for the given key.
public availableIn()
public availableIn(): void
availableIn determines the number of seconds until logging in is available again.
public clear()
public clear(): void
clear the login locks for the given user credentials.
public increment()
public increment($decaySeconds = 60): void
increment the login attempts for the user.
public tooManyAttempts()
public tooManyAttempts($maxAttempts = 5): void
tooManyAttempts determines if the user has too many failed login attempts.
Protected Methods
protected throttleKey()
protected throttleKey(): string
throttleKey gets the throttle key for the given request.