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

jasonmccreary
Copy link
Contributor

@jasonmccreary jasonmccreary 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
@reinink
Copy link
Contributor

reinink commented Jun 20, 2019

@DanielCoulbourne @mattstauffer Helpful for Ziggy maybe?

@belguinan
Copy link

@reinink Very helpful!

@jasonmccreary jasonmccreary deleted the route-list-as-json branch June 24, 2019 13:48
@Namoshek
Copy link
Contributor

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
Copy link
Contributor Author

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants