Forgot Password
Learn about the password reset link logic implemented in the Larafast API Boilerplate.
Password Reset Link
This document describes the password reset link logic implemented in the Larafast API Boilerplate. The logic is primarily handled by the PasswordResetLinkController
class.
Password Reset Link Request Validation
The first step in the password reset link process is validating the incoming request data. This is done using the PasswordResetLinkRequest
class, which extends Laravel’s FormRequest
class. Currently, there are no validation rules specified in this class.
Password Reset Link Generation
The store
method in the PasswordResetLinkController
class handles the generation of the password reset link. It uses Laravel’s Password
facade to send a password reset link to the email address provided in the request.
If the password reset link cannot be sent, a ValidationException
is thrown with a message indicating the reason.
Routes
The route for password reset link generation is defined in the routes/auth.php
file. The route uses the PasswordResetLinkController
class and the store
method.
This concludes the overview of the password reset link logic in the application.
New Password Logic
This document describes the new password logic implemented in the PHP Laravel application. The logic is primarily handled by the NewPasswordController
class.
New Password Request Validation
The first step in the new password process is validating the incoming request data. This is done using the NewPasswordRequest
class, which extends Laravel’s FormRequest
class. The rules
method of this class specifies that the token
, email
, and password
fields are required.
Password Reset
The store
method in the NewPasswordController
class handles the password reset. It uses Laravel’s Password
facade to reset the user’s password. If the password reset is successful, the user’s password is updated in the database and a PasswordReset
event is dispatched.
If the password reset is not successful, a ValidationException
is thrown with a message indicating the reason.
Routes
The route for password reset is defined in the routes/auth.php
file. The route uses the NewPasswordController
class and the store
method.
This concludes the overview of the new password logic in the application.