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

change handler class cannot be loaded

$router = new Router();

$router->add( '/', [ 'controller' => 'index', 'action' => 'index', ] ); $router->notFound( [ 'controller' => 'index', 'action' => 'notfound', ] );

when i open /test or /test/demo give me a notice Exception: TestController handler class cannot be loaded

I want to running notFound, not notice

Hey you have to use this $router = new Router(false); to don't auto create default routes. docs

Good luck



815

oh i see

thanks

Hey you have to use this $router = new Router(false); to don't auto create default routes. docs

Good luck