Welcome Guest, Not a member yet? Register   Sign In
Problem with Route_To
#1

(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

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
Reply


Messages In This Thread
Problem with Route_To - by krummyjack - 04-05-2021, 11:22 PM
RE: Problem with Route_To - by InsiteFX - 04-06-2021, 01:39 AM
RE: Problem with Route_To - by krummyjack - 04-06-2021, 10:20 PM
RE: Problem with Route_To - by InsiteFX - 04-07-2021, 01:43 AM
RE: Problem with Route_To - by krummyjack - 04-07-2021, 10:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB