Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Neewd's avatar
Level 1

Redirect with messages on session don't work

Hello,

For the context, I have a route who activate the account when the user clicks on a button on his email. At the end of my controller I would like to redirect into my '/' route with a little session flash message to indicate at the user that his account has been activated.

I took the documentation from Laravel with this little piece of code :

return redirect('dashboard')->with('status', 'Profile updated!');

I adapt this example to my needs like this :

return redirect('/')->with('message', 'You're account has been activated!');

The only part who changed in comparison of the documentation example is that I use Vue components as front-end so when my component mount, I check if the session exists, but it always returns me false :(

Does anyone have this kind of example with Vue who actually works ?

Thank you for your kind help and your time,

0 likes
0 replies

Please or to participate in this conversation.