I am using the annotation runner and when I add a prefix it seems to fall back to the default routing pattern.
$router = new Phalcon\Mvc\Router\Annotations();
$router->addModuleResource('frontend', 'Foo\Frontend\Controllers\Index', '/foo');
$di->set('router', $router);
/**
* @RoutePrefix("/bar")
*/
class IndexController extends ControllerBase
{
/**
* @Get("/")
*/
public function indexAction()
{
echo "foo";
}
}
https://example.com/foo/bar/ gives me
php Phalcon\Mvc\Dispatcher->_throwDispatchException(FooController handler class cannot be loaded, 2)
Is there any obvious error in my code? I have tried multiple variants and it works without have the prefix in addModuleResource.