Here is the error I get when try annotations routes at phalcon : Class IndexController does not exist
$di['router'] = function () {
$router = new RouterAnnotations(false); //new Router();
$router->setUriSource(\Phalcon\Mvc\Router::URI_SOURCE_SERVER_REQUEST_URI);
$router->setDefaultModule('frontend');
$router->setDefaultNamespace('Test\Frontend\Controllers');
$router->addResource('Index');
return $router;
};
<?php
namespace Test\Frontend\Controllers;
/**
* @RoutePrefix("/")
*/
class IndexController extends ControllerBase
{
/**
* @Get("/")
*/
public function indexAction()
{
}
/**
* @Post("/test")
*/
public function testAction()
{
var_dump('ha');
exit;
}
}