04-05-2021, 11:22 PM
(This post was last modified: 04-05-2021, 11:24 PM by krummyjack.)
I have programmed the following route which works correctly, it uses a regex
But when using route_to function it fails, for example
preg_match(): Compilation failed: missing closing parenthesis at offset 41
SYSTEMPATH/Router/RouteCollection.php at line 1351
Code:
$routes->addPlaceholder('slug_alfa', '[a-z0-9]+[\-]?[a-z0-9]+([\-][a-z0-9]+)*');
$routes->get('(:slug_alfa)/sitios-interes', 'Web_Empresa::sitio_interes/$1',["as"=>"web_empresa_servicios_interes"]);
But when using route_to function it fails, for example
PHP Code:
route_to("web_empresa_servicios_interes",'slug')
preg_match(): Compilation failed: missing closing parenthesis at offset 41
SYSTEMPATH/Router/RouteCollection.php at line 1351