Hi,
is it possible to create plural/singular controller names references. For instance locations would go to locations/list and location/1 would go to locations/view/id/1
I dont want to write 20 times the same line, but rather lookup in an array what the singular name is (my controllers/models are by default plural).
these are my current url management rules
'rules'=>array(
'admin' => 'admin/projects',
array('api/<controller>/list/include/<include>', 'pattern'=>'api/<controller:(locations|hotspots|projects)>/include/<include>', 'verb'=>'GET'),
array('api/<controller>/list', 'pattern'=>'api/<controller:\w+>', 'verb'=>'GET'),
array('api/<controller>/view', 'pattern'=>'api/<controller:\w+>/<id:\d+>', 'verb'=>'GET'),
array('api/<controller>/update', 'pattern'=>'api/<controller:\w+>/<id:\d+>', 'verb'=>'PUT'),
array('api/<controller>/delete', 'pattern'=>'api<controller:\w+>/<id:\d+>', 'verb'=>'DELETE'),
array('api/<controller>/create', 'pattern'=>'api/<controller:\w+>', 'verb'=>'POST'),
//default controller/action path
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
or alternitively, all my controllernames are simple plural names. Removing the s, would 99% match the singular name. Would this be possible in the regex?