Welcome Guest, Not a member yet? Register   Sign In
Routes and Placeholders
#1

(This post was last modified: 05-21-2021, 04:23 AM by p.mancini.)

In Config\Routes.php I created this roule
PHP Code:
$routes->group(SEGMENTURL_ADMIN, ['filter' => 'admin_role:superadmin,admin'], function($routes) {
    
$routes->get('(:segment)''$1_admin');
}); 
but the script return a 404 error (\App\Controllers$1_admin::index).

If I add any char before the placeholder, example
PHP Code:
$routes->group(SEGMENTURL_ADMIN, ['filter' => 'admin_role:superadmin,admin'], function($routes) {
    
$routes->get('(:segment)''_$1_admin');
}); 
the script run ok!!!


No problem without a group routes, for example 
PHP Code:
$routes->get('{locale}/(:segment)''$1_frontend'); 


is there a bug or am I wrong something?

Thanks!
Reply


Messages In This Thread
Routes and Placeholders - by p.mancini - 05-21-2021, 03:46 AM
RE: Routes and Placeholders - by InsiteFX - 05-21-2021, 04:33 AM
RE: Routes and Placeholders - by p.mancini - 05-21-2021, 05:19 AM
RE: Routes and Placeholders - by InsiteFX - 05-21-2021, 12:26 PM
RE: Routes and Placeholders - by p.mancini - 05-22-2021, 08:36 AM
RE: Routes and Placeholders - by InsiteFX - 05-22-2021, 08:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB