• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
generate routes

#1
easy generate routes concept:

https://github.com/yonineitor/routes-ci

easy to use
PHP Code:
/**
 * @route::arguments
 */
class Example3 extends CI_Controller
{
  
/**
 * @route::numeric-values/(:num)/(:num)
 */
  
function numeric$a $b ){
    
//output url: /arguments/numeric-values/$1/$2
  
}

 
/**
 * @route::any-values/(:any)
 */
  
function any$a ){
    
//output url: /arguments/any-values/$1
  
}

  
/**
 * @route::several/(:num)/(:num)/(:any)/(:any)
 */
  
function several$a$b $c$d  ){
    
//output url: /arguments/several/$1/$2/$3/$4
  


Only run file on FCPATH: php routes

enjoy!
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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