In this tutorial, i will show you how to get all routes list in codeigniter application. Actually, few days ago i was creating one example on codeigniter 3 project. But when i access route from url it show me 404 not found page. i thought error from index.php or something, but tried that way and nothing happen.
Then i plan to get list of all routes and check i created route successfully or not. But i don't know how to get list of all routes in codeigniter. So finally i search on google and find out solution, so in this example, you can also get all routes. Just copy below code and put in your codeigniter app.
Get All Routes:
$routes = $this->router->routes;
I hope you got solution.....
Do you like below Tutorials ?
- CRUD Laravel 7.x and 6.x Example
- Image Upload Laravel 7.x and 6.x Tutorial
- Laravel 7.x and 6.x Delete File from public folder example
- How to delete directory in Laravel 7.x and 6.x?
- How to create directory if not exists in Laravel 7.x and 6.x?
- Laravel 7.x and 6.x get all files in directory example
- Laravel 7.x and 6.x check file exists in folder example
- Ajax Autocomplete Textbox in Laravel 7.x and 6.x Example