• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dynamic Routes

#3
(03-14-2019, 11:56 PM)lorenzoallopez91 Wrote: ROUTES

$route['sample1/(:any)'] = 'ctrl1/index/$1';
$route['sample1'] = 'ctrl1/index';

$route['sample2/(:any)'] = 'ctrl2/index/$1';
$route['sample2'] = 'ctrl2/index';


Ctrl1
function index($i1,$i2){
  // your code for model and view
}

Ctrl2
function index($i1,$i2){
  // your code for model and view
}

I'm sorry but it didn't worked out, and I didn't find any routing with this notation in the documentation... My routes are defined by:

$routes->get('/callcenter', 'Callcenter::index');
$routes->get('/callcenter/(:any)', 'Callcenter::$1');
Reply


Messages In This Thread
Dynamic Routes - by GuilhermeBiz - 03-14-2019, 11:39 AM
RE: Dynamic Routes - by lorenzoallopez91 - 03-14-2019, 11:56 PM
RE: Dynamic Routes - by GuilhermeBiz - 03-15-2019, 07:08 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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