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

[8.x] Added "exclude-path" option #36619

Merged
merged 1 commit into from
Mar 17, 2021
Merged

[8.x] Added "exclude-path" option #36619

merged 1 commit into from
Mar 17, 2021

Conversation

J2TEAM
Copy link
Contributor

@J2TEAM J2TEAM commented Mar 16, 2021

The development team at my company has just installed Telescope and found that the route:list command now will show all Telescope's routes. This is a little annoying.

After searching on Google, I found this issue was mentioned by @shahvirag. Screenshot:

Before laravel/telescope installed.

image

After laravel/telescope installed.

image

So in this PR, I added an option to be able to remove unwanted routes from the list.

Usage

php artisan route:list --exclude-path=<path>

For example, in our case, we would run this command to remove all Telescope's routes from the list:

php artisan route:list --exclude-path=telescope

You can use a different value for other cases.

@GrahamCampbell
Copy link
Member

Hmmm, why not use grep?

@J2TEAM
Copy link
Contributor Author

J2TEAM commented Mar 16, 2021

Hmmm, why not use grep?

I think there are few reasons:

  1. grep is not available on Windows.
  2. We already have the --path option, which is very similar. --exclude-path is just an additional option that will help developers have a better experience.
  3. Support from the framework level in my opinion is better than combining with another command to filter the results. While the route:list has several other options for filtering the results already.

@taylorotwell taylorotwell merged commit f842345 into laravel:8.x Mar 17, 2021
@taylorotwell
Copy link
Member

Renamed to --without-path and you can now comma delimited multiple paths to exclude. Thanks.

@J2TEAM J2TEAM deleted the patch-1 branch March 18, 2021 18:33
@PovilasKorop
Copy link
Contributor

Just installed Laravel 8.34, and the final key name is actually --except-path
Naming is hard :)

@J2TEAM J2TEAM mentioned this pull request Mar 24, 2021
@chantouchsek
Copy link

Just installed Laravel 8.34, and the final key name is actually --except-path
Naming is hard :)

Yes, that right. i tried a few things, but no luck, thank you.

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.

None yet

5 participants