Skip to content

Commit

Permalink
disable the OOTB login route and shift it to the admin panel
Browse files Browse the repository at this point in the history
  • Loading branch information
hellboy1975 committed Mar 3, 2024
1 parent 903c15a commit c59c2e6
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 31 deletions.
5 changes: 5 additions & 0 deletions pint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"notPath": [
"/routes/auth.php"
]
}
62 changes: 31 additions & 31 deletions routes/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,47 +10,47 @@
use App\Http\Controllers\Auth\VerifyEmailController;
use Illuminate\Support\Facades\Route;

Route::middleware('guest')->group(function () {
Route::get('register', [RegisteredUserController::class, 'create'])
->name('register');
// Route::middleware('guest')->group(function () {
// Route::get('register', [RegisteredUserController::class, 'create'])
// ->name('register');

Route::post('register', [RegisteredUserController::class, 'store']);
// Route::post('register', [RegisteredUserController::class, 'store']);

Route::get('login', [AuthenticatedSessionController::class, 'create'])
->name('login');
// Route::get('login', [AuthenticatedSessionController::class, 'create'])
// ->name('login');

Route::post('login', [AuthenticatedSessionController::class, 'store']);
// Route::post('login', [AuthenticatedSessionController::class, 'store']);

Route::get('forgot-password', [PasswordResetLinkController::class, 'create'])
->name('password.request');
// Route::get('forgot-password', [PasswordResetLinkController::class, 'create'])
// ->name('password.request');

Route::post('forgot-password', [PasswordResetLinkController::class, 'store'])
->name('password.email');
// Route::post('forgot-password', [PasswordResetLinkController::class, 'store'])
// ->name('password.email');

Route::get('reset-password/{token}', [NewPasswordController::class, 'create'])
->name('password.reset');
// Route::get('reset-password/{token}', [NewPasswordController::class, 'create'])
// ->name('password.reset');

Route::post('reset-password', [NewPasswordController::class, 'store'])
->name('password.update');
});
// Route::post('reset-password', [NewPasswordController::class, 'store'])
// ->name('password.update');
// });

Route::middleware('auth')->group(function () {
Route::get('verify-email', [EmailVerificationPromptController::class, '__invoke'])
->name('verification.notice');
// Route::middleware('auth')->group(function () {
// Route::get('verify-email', [EmailVerificationPromptController::class, '__invoke'])
// ->name('verification.notice');

Route::get('verify-email/{id}/{hash}', [VerifyEmailController::class, '__invoke'])
->middleware(['signed', 'throttle:6,1'])
->name('verification.verify');
// Route::get('verify-email/{id}/{hash}', [VerifyEmailController::class, '__invoke'])
// ->middleware(['signed', 'throttle:6,1'])
// ->name('verification.verify');

Route::post('email/verification-notification', [EmailVerificationNotificationController::class, 'store'])
->middleware('throttle:6,1')
->name('verification.send');
// Route::post('email/verification-notification', [EmailVerificationNotificationController::class, 'store'])
// ->middleware('throttle:6,1')
// ->name('verification.send');

Route::get('confirm-password', [ConfirmablePasswordController::class, 'show'])
->name('password.confirm');
// Route::get('confirm-password', [ConfirmablePasswordController::class, 'show'])
// ->name('password.confirm');

Route::post('confirm-password', [ConfirmablePasswordController::class, 'store']);
// Route::post('confirm-password', [ConfirmablePasswordController::class, 'store']);

Route::post('logout', [AuthenticatedSessionController::class, 'destroy'])
->name('logout');
});
// Route::post('logout', [AuthenticatedSessionController::class, 'destroy'])
// ->name('logout');
// });
2 changes: 2 additions & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
|
*/

Route::redirect('/login', '/admin/login');

Route::get('/', function () {
return view('index');
});
Expand Down

0 comments on commit c59c2e6

Please sign in to comment.