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



352

oh i see

thanks

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

Good luck