Skip to content

Instantly share code, notes, and snippets.

@JeffreyWay
Created October 15, 2014 17:21
Show Gist options
  • Save JeffreyWay/2b292d6aafb98977788f to your computer and use it in GitHub Desktop.
Save JeffreyWay/2b292d6aafb98977788f to your computer and use it in GitHub Desktop.
Add this to your ~/.bashrc file (or anywhere related) to give yourself an easy way to view the routes in your Laravel app, or filter the results down to a particular search query.
function routes()
{
if [ $# -eq 0 ]; then
php artisan route:list
else
php artisan route:list | grep ${1}
fi
}
@JeffreyWay
Copy link
Author

Now, you can do...

routes

...which will spit out all registered routes in your app.

Or, if you do...

routes admin

You'll only see the admin-specific routes.

@sineld
Copy link

sineld commented Jan 28, 2016

Thanks.

@Sunnepah
Copy link

Sunnepah commented Feb 1, 2016

Thanks Jeffrey, this is very helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment