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 ?
- Laravel 5.6 - Collection could not be converted to int
- Laravel - How to generate secure https URL from route?
- Laravel - Vue JS File Upload Example
- How to get last 7 days data in Laravel?
- Laravel Validation required if other field empty example
- Laravel Eloquent - When Case Statement in Select Query Example