Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Minus in url make router crash

Hello! I have a small problem with automating routing, when I type in browser, router display index action of controller index and action index, if I replace minus with underscore, I get 404 as normal. Router is set in auto mode, not a single route added. How can fix this ? Thanks


Solved by adding:

$router->notFound([ "controller" => "index", "action" => "notFound", ]);