Hi,
I want to pre-check the current uri on routing to check exists pages. If doesnt exist the page, pass the matched route.
For examle uri: /hello-world
// Uri matched first
// I want to check `hello-world` on Pages db
// If the page found, run this route
// If doesnt exist, pass this route
$router->add('/{alias:[0-9a-z\-]+}', array(
'controller' => 'pages',
'action' => 'index',
'alias' => 1
));
// If above doesnt matched, run this route
$router->add('/hello-world', array(
'controller' => 'hello',
'action' => 'world'
));
I hope I can tell. How can i do this?
Thanks