laravel / blog-contest-may-mayhem

242 stars 16 forks source link

Masking IDs in URLs using hashids in Laravel #81

Open BenSampo opened 6 years ago

BenSampo commented 6 years ago

https://sampo.co.uk/blog/masking-ids-in-urls-using-hash-ids-in-laravel

Krato commented 6 years ago

Very good aproach 👌

Insolita commented 6 years ago

By masking the ID, you hide the number of items in the database. How many users there are in your app, for example, might indicate how popular your app is. If I can see that the last user to sign up has the ID of 5, it's likely that your app isn't very popular yet.

But it has another side, you can start id numeration with a bigger number, ALTER TABLE tbl AUTO_INCREMENT = 17653; (for MySql) And its make effect of popular app