I'm trying to match something like:
mydomain.com/something
mydomain.com/something/2
Both should work.
This is my route:
$router->add("/{board:[a-zA-Z_]+}/{page:[0-9]?}", [ 'controller' => 'board', 'action' => 'show'] )->setName('show-board');
This however requires the trailing slash even without the page specified. Is there a way to need the slash ONLY with the page?