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

#1
Hi,

You can read routes from the comments, no longer able to generate an array of these?

You can make routes from the comments and generate them travez a simple script. Thus I do not need to go to routes.php files because my script is automatically generated.

example:
PHP Code:
/**
 * @route::example4
 */
class Example4 extends CI_Controller
{
  
/**
  * @route::{post}data_post
  */
  
function data_post(){
    
//url: example4/data_post/  method = post
  
}

 
/**
  * @route::{get}my_data_get
  */
  
function my_data_get(){
    
//url: /example4/my_data_get/ method = get
  
}


only run
Code:
php routes

This works perfectly for CI3 https://github.com/yonineitor/routes-ci
Reply

#2
I've never used that library, and it's not supported by us. A quick glance over their readme file, though, and I'd say it would need a little bit of tweaking to work with 4, but shouldn't be too bad.
Support Development  • Practical CodeIgniter 3  •
Myth:AuthVulcan - CLI Tools for CI4
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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