Support the ongoing development of Laravel.io →
Security Architecture Installation

In my application I have companies these company pages should be viewable to anyone, IE don't require authentication.

My initial though was to use Crypt on the company ID and then route model binding to have a URL that can view each company.

But this isn't working i'm getting difference values for the same number, whats the correct way to approach this.

The reason that i'm using a encrypted string in the URL and not just the company Id is because security at this point in the application is not a big deal.

What I think I need is a encryption method that doesn't ever change so no IV, it can use my application key string thing.

Thanks for you time

Last updated 2 years ago.
0

You probably need this: http://php.net/manual/en/function.mcrypt-encrypt.php cos as i understand you need to be able to encrypt / decrypt.

0

Yeah that look like it will work, is there no best practices for doing this type of thing? Creating URLs that will be not behind a members system but in reality won't be found unless someone send them the link.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

dsnowdon dsnowdon Joined 30 Nov 2015

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.

© 2025 Laravel.io - All rights reserved.