Saturday, December 20, 2014

Routing to 2 controllers?

Hi. I want to route a url to 2 controllers depending on some logic I define. For example, if I have 2 usernames Bob and BobsShop, I want localhost/Bob to route to my UsersController while localhost/BobsShop will route to my ShopsController. I've thought of one way to accomplish this - by writing a common ObjectsController that represents both a User and a Shop. Is there an easier way via cake's routing mechanism? Thanks!

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: