I am developing a CakePHP application which allows for photo uploads. It would be really nice if i could give the user a friendly unique URL of something like instagram does, ie:
http://example.com/v/157fd to view their single photo post.
What is the best approach for this, i take it its going to involve CakePHP routing at some point, but has someone got an flow of what would happen when a URL like this is hit and how these unique URLs are formed?
Thanks
the route would be easy with one line (change the controller and action to yours):
You can just use the photo id, or create your own random id. There’s also a convenient way in cake to have random id, which is to use UUID