Menu

## AuthenticatesUsers uses trait:short, trait:short

AuthenticatesUsers.php : 17

### Table of Contents

#### Methods

decayMinutes() : int
  Get the number of minutes to throttle for.
login() : RedirectResponse|Response|JsonResponse
  Handle a login request to the application.
logout() : Response
  Log the user out of the application.
maxAttempts() : int
  Get the maximum number of attempts to allow.
redirectPath() : string
  Get the post register / login redirect path.
username() : string
  Get the login username to be used by the controller.
attemptLogin() : bool
  Attempt to log the user into the application.
authenticated() : mixed
  The user has been authenticated.
clearLoginAttempts() : void
  Clear the login locks for the given user credentials.
credentials() : array<string|int, mixed>
  Get the needed authorization credentials from the request.
fireLockoutEvent() : void
  Fire an event when a lockout occurs.
guard() : StatefulGuard
  Get the guard to be used during authentication.
hasTooManyLoginAttempts() : bool
  Determine if the user has too many failed login attempts.
incrementLoginAttempts() : void
  Increment the login attempts for the user.
limiter() : RateLimiter
  Get the rate limiter instance.
loggedOut() : mixed
  The user has logged out of the application.
sendFailedLoginResponse() : Response
  Get the failed login response instance.
sendLockoutResponse() : void
  Redirect the user after determining they are locked out.
sendLoginResponse() : Response
  Send the response after the user was authenticated.
throttleKey() : string
  Get the throttle key for the given request.
validateLogin() : void
  Validate the user login request.

### Methods

#### decayMinutes()

ThrottlesLogins.php : 116

Get the number of minutes to throttle for.

`public decayMinutes() : int`

##### Return values

int

#### login()

AuthenticatesUsers.php : 29

Handle a login request to the application.

`public login(Request $request) : RedirectResponse|Response|JsonResponse`

##### Parameters

$request : Request

##### Tags

throws
  ValidationException

##### Return values

RedirectResponse|Response|JsonResponse

#### logout()

AuthenticatesUsers.php : 234

Log the user out of the application.

`public logout(Request $request) : Response`

##### Parameters

$request : Request

##### Return values

Response

#### maxAttempts()

ThrottlesLogins.php : 106

Get the maximum number of attempts to allow.

`public maxAttempts() : int`

##### Return values

int

#### redirectPath()

RedirectsUsers.php : 15

Get the post register / login redirect path.

`public redirectPath() : string`

##### Return values

string

#### username()

AuthenticatesUsers.php : 220

Get the login username to be used by the controller.

`public username() : string`

Supports flexible login: users can login with either email or registration_number. Validates the input to determine which field to use.

##### Return values

string —

The field name ('email' or 'registration_number')

#### attemptLogin()

AuthenticatesUsers.php : 151

Attempt to log the user into the application.

`protected attemptLogin(Request $request) : bool`

##### Parameters

$request : Request

##### Return values

bool

#### authenticated()

AuthenticatesUsers.php : 192

The user has been authenticated.

`protected authenticated(Request $request, mixed $user) : mixed`

##### Parameters

$request : Request
$user : mixed

#### clearLoginAttempts()

ThrottlesLogins.php : 64

Clear the login locks for the given user credentials.

`protected clearLoginAttempts(Request $request) : void`

##### Parameters

$request : Request

#### credentials()

AuthenticatesUsers.php : 164

Get the needed authorization credentials from the request.

`protected credentials(Request $request) : array<string|int, mixed>`

##### Parameters

$request : Request

##### Return values

array<string|int, mixed>

#### fireLockoutEvent()

ThrottlesLogins.php : 75

Fire an event when a lockout occurs.

`protected fireLockoutEvent(Request $request) : void`

##### Parameters

$request : Request

#### guard()

AuthenticatesUsers.php : 259

Get the guard to be used during authentication.

`protected guard() : StatefulGuard`

##### Return values

StatefulGuard

#### hasTooManyLoginAttempts()

ThrottlesLogins.php : 20

Determine if the user has too many failed login attempts.

`protected hasTooManyLoginAttempts(Request $request) : bool`

##### Parameters

$request : Request

##### Return values

bool

#### incrementLoginAttempts()

ThrottlesLogins.php : 33

Increment the login attempts for the user.

`protected incrementLoginAttempts(Request $request) : void`

##### Parameters

$request : Request

#### limiter()

ThrottlesLogins.php : 96

Get the rate limiter instance.

`protected limiter() : RateLimiter`

##### Return values

RateLimiter

#### loggedOut()

AuthenticatesUsers.php : 249

The user has logged out of the application.

`protected loggedOut(Request $request) : mixed`

##### Parameters

$request : Request

#### sendFailedLoginResponse()

AuthenticatesUsers.php : 205

Get the failed login response instance.

`protected sendFailedLoginResponse(Request $request) : Response`

##### Parameters

$request : Request

##### Tags

throws
  ValidationException

##### Return values

Response

#### sendLockoutResponse()

ThrottlesLogins.php : 47

Redirect the user after determining they are locked out.

`protected sendLockoutResponse(Request $request) : void`

##### Parameters

$request : Request

##### Tags

throws
  ValidationException

#### sendLoginResponse()

AuthenticatesUsers.php : 175

Send the response after the user was authenticated.

`protected sendLoginResponse(Request $request) : Response`

##### Parameters

$request : Request

##### Return values

Response

#### throttleKey()

ThrottlesLogins.php : 86

Get the throttle key for the given request.

`protected throttleKey(Request $request) : string`

##### Parameters

$request : Request

##### Return values

string

#### validateLogin()

AuthenticatesUsers.php : 66

Validate the user login request.

`protected validateLogin(Request $request) : void`

Registers custom validators:

- checkschool: Validates that the school is active
- checkusers: Validates that the user exists
- checkactive: Validates that the user is not suspended (inactive status)
- checkexit: Validates that the user has not exited (exit status)

##### Parameters

$request : Request

## Search results