Search code examples
laravellaravel-routing

Laravel route() - not passing root folder name


Thank you in advance,

I have one route defined like

Route::get('/registration/verify/{token}', 'UserController@verifyRegisteredEmail')->name('registration.email.verification');

I am accessing the route like

route('registration.email.verification', ['token' => $email_register_verification_token]);

when I am printing above line it is giving them out as below

http://localhost/registration/verify/87006dcc95bcf7a9ea83e523f2aa53f9

But it should be

http://localhost/{root}/registration/verify/87006dcc95bcf7a9ea83e523f2aa53f9

Solution

  • Try setting the proper APP_URL in .env. It only outputs the wrong value from there.