Support the ongoing development of Laravel.io →
posted 7 months ago
Routing
Last updated 7 months 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

1

share your code image first

Last updated 7 months 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!

LaraJobs

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.

© 2022 Laravel.io - All rights reserved.