trait ResetsPasswords (View source)

Traits

Methods

string
redirectPath()

Get the post register / login redirect path.

showResetForm(Request $request, string|null $token = null)

Display the password reset view for the given token.

reset(Request $request)

Reset the given user's password.

array
rules()

Get the password reset validation rules.

array
validationErrorMessages()

Get the password reset validation error messages.

array
credentials(Request $request)

Get the password reset credentials from the request.

void
resetPassword(CanResetPassword $user, string $password)

Reset the given user's password.

void
setUserPassword(CanResetPassword $user, string $password)

Set the user's password.

sendResetResponse(Request $request, string $response)

Get the response for a successful password reset.

sendResetFailedResponse(Request $request, string $response)

Get the response for a failed password reset.

broker()

Get the broker to be used during password reset.

guard()

Get the guard to be used during password reset.

Details

string redirectPath()

Get the post register / login redirect path.

Return Value

string

Factory|View showResetForm(Request $request, string|null $token = null)

Display the password reset view for the given token.

If no token is present, display the link request form.

Parameters

Request $request
string|null $token

Return Value

Factory|View

RedirectResponse|JsonResponse reset(Request $request)

Reset the given user's password.

Parameters

Request $request

Return Value

RedirectResponse|JsonResponse

protected array rules()

Get the password reset validation rules.

Return Value

array

protected array validationErrorMessages()

Get the password reset validation error messages.

Return Value

array

protected array credentials(Request $request)

Get the password reset credentials from the request.

Parameters

Request $request

Return Value

array

protected void resetPassword(CanResetPassword $user, string $password)

Reset the given user's password.

Parameters

CanResetPassword $user
string $password

Return Value

void

protected void setUserPassword(CanResetPassword $user, string $password)

Set the user's password.

Parameters

CanResetPassword $user
string $password

Return Value

void

protected RedirectResponse|JsonResponse sendResetResponse(Request $request, string $response)

Get the response for a successful password reset.

Parameters

Request $request
string $response

Return Value

RedirectResponse|JsonResponse

protected RedirectResponse|JsonResponse sendResetFailedResponse(Request $request, string $response)

Get the response for a failed password reset.

Parameters

Request $request
string $response

Return Value

RedirectResponse|JsonResponse

PasswordBroker broker()

Get the broker to be used during password reset.

Return Value

PasswordBroker

protected StatefulGuard guard()

Get the guard to be used during password reset.

Return Value

StatefulGuard

Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.