Home / Snippets / How to Get All of The Available Routes in Laravel
How to Get All of The Available Routes in Laravel cover

How to Get All of The Available Routes in Laravel

193

2 years ago

0 comments

Sometimes you might want to get all of the available routes in Laravel to see the bird-eye view of the available routes.

Via Command Line
To do that you can run the route list command in your terminal.
php artisan route:list

Via Route Facade
The other method is to use the "getRoutes()" method of the "Route" facade.
Route::get('/get-all-routes', function () {
    return \Route::getRoutes();
});
notion avatar

Ahmad Aziz

Week-end developer currently experimenting with web, mobile, and all things programming.

Topics:

Frontend

Resource

Average

Average

Support Us

If you like our tutorial, support us by being our Patreon or buy us some coffee ☕️

Post Tutorials

Learn trending tutorials for ReactJs, React Native, VueJS, NextJs, Laravel, Tailwind CSS, and Flutter development.
View Tutorials

Code Components

Collection of Tailwind CSS components for everyone to use. Browse all of the components that's right for your web projects
View Components

Welcome to PostSrc V3

PostSrc Dark Logo

You have to login to favorite this