Request action follows normal URL routing rules
If you use prefix routing , you cannot access function prefix_foo() through the URL of the form /controller/prefix_foo - it needs to be the corresponding url prefix: /prefix/controller/foo .
So your request action request should be:
$brand = $this->requestAction('/prefix/brands/getnames/');
Please note: if the only thing this method does is call the model method, you better just do:
$model = ClassRegistry::init('Brand'); $brand = $model->someMethod();
source share