• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
routing with lang parameter in url

I'm trying to build multi language website that holds [en|es] . everything seems work fine for me except for the routing. 

I move index.php from public folder to main folder and did the required modification. 

my route.php file 
$routes->get('{locale}/login', 'Login::index');
$routes->get('{locale}/login/method2/(:any)', 'Login::Method2/$1');

routing seems to work fine, but only with one parameter. 
* what if I want to add more parameters?
* what if I want to have auto routing and not to add each function in the routing file?

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.