class LoginRequest extends FormRequest (View source)

Handles validation for user login requests.

This request ensures that the email and password fields are provided and conform to basic authentication requirements.

Methods

bool
authorize()

Determines if the user is authorized to make this request.

array
rules()

Defines the validation rules applied to the login request.

array
messages()

Provides custom error messages for rule violations.

string
ip()

Returns the IP address of the request origin.

Details

bool authorize()

Determines if the user is authorized to make this request.

In this case, all users are allowed since login does not require authentication.

Return Value

bool

always true for login

array rules()

Defines the validation rules applied to the login request.

Return Value

array

validation rules for email and password fields

array messages()

Provides custom error messages for rule violations.

Return Value

array

translated validation messages

string ip()

Returns the IP address of the request origin.

Return Value

string