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
  • 7,744
  • 9
  • 41
  • 77

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,514
  • 8
  • 50
  • 82