From c59c2e6800b4a92362549a62600c7a34be146ac3 Mon Sep 17 00:00:00 2001 From: hellboy1975 Date: Sun, 3 Mar 2024 14:48:35 +1030 Subject: [PATCH] disable the OOTB login route and shift it to the admin panel --- pint.json | 5 ++++ routes/auth.php | 62 ++++++++++++++++++++++++------------------------- routes/web.php | 2 ++ 3 files changed, 38 insertions(+), 31 deletions(-) create mode 100644 pint.json diff --git a/pint.json b/pint.json new file mode 100644 index 0000000..ef944b9 --- /dev/null +++ b/pint.json @@ -0,0 +1,5 @@ +{ + "notPath": [ + "/routes/auth.php" + ] +} \ No newline at end of file diff --git a/routes/auth.php b/routes/auth.php index e11fb1a..6de4310 100644 --- a/routes/auth.php +++ b/routes/auth.php @@ -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'); +// }); diff --git a/routes/web.php b/routes/web.php index 01f9c51..4021bf5 100644 --- a/routes/web.php +++ b/routes/web.php @@ -14,6 +14,8 @@ | */ +Route::redirect('/login', '/admin/login'); + Route::get('/', function () { return view('index'); });