I have a MessageController and I want users to be able to visit the messages/add/ action, passing an id as a variable ie messages/add/5 but for this id not to be visible in the url.
From what I read I believe the following should work:
Router::connect('/messages/add/*', array('controller' => 'messages', 'action' => 'add'));
My understanding is that anywhere that there's a link to messages/add/5 it would appear as a link to messages/add/ and when the user visits messages/add/5 it should show in the address bar as messages/add/. This doesn't work for me.
Do I not understand properly or am I doing something wrong?
Thanks!