I'm trying to use annotations router but I'm facing the below exception
"A dependency injection container is required to access the 'annotations' service"
You can review my settings and configurations below
Setting up annotations router in public/index.php
<?php
$di->set('router', function () {
$router = new \Phalcon\Mvc\Router\Annotations(false);
$router->addResource('User');
return $router;
});
My UserController.php
<?php
/**
* @RoutePrefix("/user")
*/
class UserController extends \Phalcon\Mvc\Controller
{
/**
* @Get("/signin")
*/
public function signinAction()
{
}
}
When point my browser to domain/user/signin I face the mentioned exception. I would appreciate any kind of help as I'm new to the world of Phalcon.