We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

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();


7.1k

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.