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

[9.x] Added --only-vendor option to route:list command #42549

Merged

Conversation

ash-jc-allen
Copy link
Contributor

Hey! This PR is only a small one but I think it could be useful. It adds a new --only-vendor option that you can use when calling the route:list command. If you use this option, only the vendor routes will be output in the terminal (your own application's routes will be ignored).

This is example of what it would look like:

Screenshot 2022-05-28 at 00 46 46

I think this is something that could be pretty handy because it gives you a quick insight into any routes that you aren't aware of that might have been registered by packages.

I know in the past that I've installed packages in my projects and only realised further down the line that they're registering routes (usually for a feature that I'm not needing). So, by having this, it'd make it easier to "audit" (for lack of a better term) my project and make sure I've not got any open routes that are expecting authorisation or authentication to be added to them (via a service provider, config, etc).

By the way, I did consider adding some validation to check that the --only-vendor and --except-vendor flags weren't passed at the same time. But, it looks like if you do that anyway, you'll get the following error message: Your application doesn't have any routes matching the given criteria. which sort of covers the base already. If you think a specific error message would be better for this situation, I'd be happy to add it.

If this is something that you might consider merging, please let me know if any changes need making 😄

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.

2 participants