Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.8] Add option to output route:list as JSON #28894

Merged
merged 2 commits into from Jun 20, 2019

Conversation

Projects
None yet
5 participants
@jasonmccreary
Copy link
Contributor

commented Jun 19, 2019

The route:list command is big window into the application. This adds a --json option which outputs the report in JSON format. As this is easily parseable programmatically it allows this comand to be used readily by other tools and services.

@GrahamCampbell GrahamCampbell changed the title Add option to output route:list as JSON [5.8] Add option to output route:list as JSON Jun 19, 2019

@taylorotwell taylorotwell merged commit 8452136 into laravel:5.8 Jun 20, 2019

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/styleci/pr The analysis has passed
Details
@reinink

This comment has been minimized.

Copy link
Contributor

commented Jun 20, 2019

@DanielCoulbourne @mattstauffer Helpful for Ziggy maybe?

@belguinan

This comment has been minimized.

Copy link

commented Jun 20, 2019

@reinink Very helpful!

@jasonmccreary jasonmccreary deleted the jasonmccreary:route-list-as-json branch Jun 24, 2019

@Namoshek

This comment has been minimized.

Copy link

commented Jun 26, 2019

Wouldn't it make sense to have the HTTP methods of a route be returned as array instead of a | separated string as seen in the normal output?

@jasonmccreary

This comment has been minimized.

Copy link
Contributor Author

commented Jun 26, 2019

I didn't want to modify existing code in hopes this could squeeze into a patch release as I needed it for my project. But yes, it might be nice to return the methods and middleware as an array. Feel free to make a new PR with those changes. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.