Nana-Odai
8 months ago
881
7
Laravel

Redirecting to intended url

Posted 8 months ago by Nana-Odai

I want to redirect a user to the intended URL after registration. i Have tried several solution online. stack overflow, laracast and other sites, but still not getting the desired result. The login works.

My routes

Route::Group(['middleware' => 'auth', 'namespace' => 'Users'], function(){
    // payment
    Route::get('dashboard', '[email protected]')->name('dashboard');

    // payment
    Route::get('payment_plans', '[email protected]_plans')->name('payment_plans');

    // payment
    Route::post('submitPayment', '[email protected]')->name('submitPayment');
});

The user is redirected to any of the above routes after login, but after registration, it does not redirect the user to the routes above but to this in the controller protected $redirectTo = '/home';

Please sign in or create an account to participate in this conversation.