Support the ongoing development of Laravel.io →
posted 2 years ago
Routing
Last updated 2 years ago.
0

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,

Cheers

lucianofpaula liked this reply

1

share your code image first

Last updated 2 years ago.
0

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

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

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

Your logo here?

Laravel.io

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

© 2024 Laravel.io - All rights reserved.