Skip to content

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

Merged
taylorotwell merged 2 commits intolaravel:5.8from
jasonmccreary:route-list-as-json
Jun 20, 2019
Merged

[5.8] Add option to output route:list as JSON#28894
taylorotwell merged 2 commits intolaravel:5.8from
jasonmccreary:route-list-as-json

Conversation

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

reinink commented Jun 20, 2019

@DanielCoulbourne @mattstauffer Helpful for Ziggy maybe?

@belguinan
Copy link
Copy Markdown

@reinink Very helpful!

@jasonmccreary jasonmccreary deleted the route-list-as-json branch June 24, 2019 13:48
@Namoshek
Copy link
Copy Markdown
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
Copy Markdown
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