Password Reset Link
This document describes the password reset link logic implemented in the Larafast API Boilerplate. The logic is primarily handled by thePasswordResetLinkController 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 thePasswordResetLinkRequest class, which extends Laravel’s FormRequest class. Currently, there are no validation rules specified in this class.
Password Reset Link Generation
Thestore 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 theroutes/auth.php file. The route uses the PasswordResetLinkController class and the store method.
New Password Logic
This document describes the new password logic implemented in the PHP Laravel application. The logic is primarily handled by theNewPasswordController class.
New Password Request Validation
The first step in the new password process is validating the incoming request data. This is done using theNewPasswordRequest 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
Thestore 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 theroutes/auth.php file. The route uses the NewPasswordController class and the store method.

