use of underscore
donboe opened this issue · comments
I I just started using AltoRouter and so far I like it a lot. There is one thing I noticed yesterday though. In my controller I tried an action like this:
concert_photosAction but that gave me an error. When I tried concertPhotosAction it did work. Can someone clarify why I can't use a underscore in the url, or what I should adjust so I can use the underscore.
Thank you in advance
Add this to your routes file and instead of a
use ap
to match strings with underscore:
// Same as 'a' but accepts underscores
$router->addMatchTypes(['ap' => '[0-9A-Za-z_]++']);