0

Here is a Vine video with id of hWZu0igHA2p. How can I add this functionality of unique obfuscated id without any database changes or breaking a lot of code by overriding id method

https://vine.co/v/hWZu0igHA2p

Encore PTL
  • 8,084
  • 10
  • 43
  • 78

1 Answers1

1

Check out http://www.hashids.org/

That will let you generate unique alphanumeric codes based off of the primary key in your database. You can seed it with a secret salt so that it's only reversable by you.

spike
  • 9,794
  • 9
  • 54
  • 85