/:int /([0-9]+) Matches an integer parameter
Meaning it actually expects /:int
, not just :int
. Just use named params with custom regex?
$router->add(
'/album/view/{slug}-([0-9]+)',
array(
'controller' => 'album',
'action' => 'view',
'id' => 1, // ([0-9]+)
)
);
I didn't test this, but must be along those lines.