Hi all,
My routing currently looks like this:
$Router->add(
'/{name}/',
[
'controller' => 'store'
,'action' => 'index'
]
);
$Router->add(
'/{name}/checkout/',
[
'controller' => 'store'
,'action' => 'checkout'
]
);
$Router->add(
'/{name}/information/',
[
'controller' => 'store'
,'action' => 'information'
]
);
I have some more store-specific routes to add though, and I'd rather not add a different route for each route when I can just add a catch-all. I thought this should work:
$Router->add(
'/{name}/',
[
'controller' => 'store'
,'action' => 'index'
]
);
$Router->add(
'/{name}/{:action}/',
[
'controller' => 'store'
,'action' => 1
]
);
But I keep getting a route not found exception. For a URL such as /test/information/ I get the controller name being "test" (Boo) and the action name being "information" (Yay).
Why is the controller name being overwritten?