IndexController handler class cannot be loaded

Good personal day, I have this problem and can not solve it. Instanciei this class, and then used the handle method al complained that could not instantiate, what should I do?

    $id->set('view',function(){
        $view = new \Phalcon\Mvc\View();
        $view->setViewsDir('../app/views/');
        return $view;
    });
    $application = new \Phalcon\Mvc\Application($id);
    echo $application->handle()->getContent();


3.6k

I don't think it don't come from your "view" DI but usually when you have this error, it means you don't create your controller file or phalcon don't find it. Create IndexController.php in your controller directory.