Skip to content

Commit b8ed160

Browse files
author
ahmadhuss
committed
refactor: Added comments for the forgot password route for clear explanation
1 parent 97fdde7 commit b8ed160

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

routes/web.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
use App\Http\Controllers\Admin\Auth\AdminForgotPasswordController;
44
use App\Http\Controllers\Admin\Auth\AdminResetPasswordController;
5+
use App\Http\Controllers\Auth\LoginController;
56
use App\Http\Controllers\HomeController;
6-
use App\Http\Controllers\Admin\Auth\LoginController;
77
use App\Http\Controllers\Admin\Auth\AdminController;
88
use Illuminate\Support\Facades\Route;
99

@@ -52,8 +52,10 @@
5252
Route::post('register', [AdminController::class, 'register']);
5353

5454
// Password Reset
55-
Route::get('password/reset', [AdminForgotPasswordController::class, 'showLinkRequestForm'])->name( 'admin.password.request'); // Currently this name route ('admin.password.request') is not used anywhere!
56-
Route::post('password/email', [AdminForgotPasswordController::class, 'sendResetLinkEmail'])->name('admin.password.email');
55+
Route::get('password/reset', [AdminForgotPasswordController::class, 'showLinkRequestForm'])->name('admin.password.request'); // This name route is used inside the admin `login.blade.php` file to show the forgot password link which is nothing but shows an email blade.php file.
56+
// We explicitly are not defining the method `sendResetLinkEmail()` inside the controller instead we are using same master body of this method which is defined inside the `AdminForgotPasswordController` trait `SendsPasswordResetEmails` method.
57+
Route::post('password/email', [AdminForgotPasswordController::class, 'sendResetLinkEmail'])->name('admin.password.email'); // The email.blade.php form file will use this route to send post request.
58+
5759

5860
});
5961

0 commit comments

Comments
 (0)