mercredi 13 avril 2022

how i can How can I redirect to the correct login page in Laravel carrying different middleware?

I made a duplicate of the auth file in the name of admin and modified some related things and everything works fine, but the problem is that when I go to the "/dashboard" link, it is redirected to "login" and I was supposed to be transferred to "dashboard/login" "I think the problem is in the Authenticate.php file, or is it something else? Is there someone who can help me and explain the solution to the problem?

enter image description here

part of admin route code

Route::group(['middleware' => ['guest:admin'], 'prefix'=>'dashboard', 'as'=>'dashboard.'],function(){
Route::get('register', [RegisteredUserController::class, 'create'])->name('register');
Route::post('register', [RegisteredUserController::class, 'store']);
Route::get('login', [AuthenticatedSessionController::class, 'create'])->name('login');
Route::post('login', [AuthenticatedSessionController::class, 'store']);
Route::get('forgot-password', [PasswordResetLinkController::class, 'create'])->name('password.request');
Route::post('forgot-password', [PasswordResetLinkController::class, 'store'])->name('password.email');
Route::get('reset-password/{token}', [NewPasswordController::class, 'create'])->name('password.reset');
Route::post('reset-password', [NewPasswordController::class, 'store'])->name('password.update');});


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/Yz6vm1a
via IFTTT

Aucun commentaire:

Enregistrer un commentaire