Support the ongoing development of →
posted 2 years ago
Last updated 2 years ago.

Hi Luciano.

If I understand you thread correctly, i guess your logic won't fit. Laravel has no way to identify the difference between /{$token} and /about. He will likely try to match 'about' as a token.

I guess the best here for you is to set a second level of routing like:

/about /services /whatever-other-pages-you-need

and then: /token/{$token} or /user/{$token}

Like this, you won't have any conflict.

Hope it helps you,


lucianofpaula liked this reply


share your code image first

Last updated 2 years ago.

Maybe it would be better to store the token in a cookie or session variable, and inspect it's existence server-side. Another idea might be to pass the token as a get parameter, i.e. route?_token=your_token


Sign in to participate in this thread!


Your banner here too?


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.