@usman9023 you should put it as query parameter instead
$url = env('FRONTEND_URL') . '/activate-account?token=' . urlencode($token);
path: '/activate-account'
then in your vue file to access the token
this.$route.query.token
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
But when i change the web address to http://localhost:5173/activate-account/3 its working fine
Here is the vue code :
{
path: '/activate-account/:token',
name: 'activate-account',
component: ActivateAccountView
},
here is the laravel code :
$mail = $user->email;
$url = env('FRONTEND_URL') . '/activate-account/' . urlencode($token);
Mail::send("Mail.UserActivation", ['token' => $token, 'url' => $url , 'user' => $user->name], function ($message) use ($mail) {
$message->to($mail);
$message->from(env('MAIL_FROM_Email'), env('MAIL_FROM_NAME'));
$message->subject('Car Rental User Activation');
});
Im new in Vue can someone tell me what i am doing wrong
@usman9023 you should put it as query parameter instead
$url = env('FRONTEND_URL') . '/activate-account?token=' . urlencode($token);
path: '/activate-account'
then in your vue file to access the token
this.$route.query.token
Please or to participate in this conversation.