I'm developing a REST API. I found out a few extensions but the client need is drastically different from what these extensions provide.
I need a separate action for each of the request type in each controller, so I can have the full control to myself.
I'm currently using the following URLmanager rules;
'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array(
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
Which arranges my URL this way;
http://www.mywebsite.com/index.php/<module>/<controller>/<action>
This can easily service a request like this;
http://www.mywebsite.com/index.php/api/user/register
The problem I'm facing is how to service these type of requests.
http://www.mywebsite.com/index.php/api/user/15/profile
Is there a way I can get 15 (id/pk) and "profile" as two parameters?
Thanks in advance.