Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

Hide telescope routes from route:list #1982

Closed
shahvirag opened this issue Dec 24, 2019 · 9 comments
Closed

Hide telescope routes from route:list #1982

shahvirag opened this issue Dec 24, 2019 · 9 comments

Comments

@shahvirag
Copy link

shahvirag commented Dec 24, 2019

Artisan command php artisan route:list displays all application routes.
After telescope install it shows all telescope routes with application routes.

Ignore telescope routes to display in php artisan route:list command just like ignition package routes are doing.

Before laravel/telescope installed.

before_telescope

After laravel/telescope installed.

after_telescope

@shahvirag shahvirag reopened this Dec 24, 2019
@Michael-Stokoe
Copy link

route:list should group the routes together in the order they were loaded in.

So all your telescope routes will be next to eachother, horizon routes etc.

Just scroll past. Or if you're looking for something specific, ctrl+F is your friend.

@shahvirag shahvirag reopened this Jan 6, 2020
@shahvirag
Copy link
Author

shahvirag commented Jan 6, 2020

route:list should group the routes together in the order they were loaded in.

So all your telescope routes will be next to eachother, horizon routes etc.

Just scroll past. Or if you're looking for something specific, ctrl+F is your friend.

I can do that. But for simplification we could also add more options to display all routes.
route:list --with-plugin

Idea:

route:list
This will display all routes register inside routes/*.php

route:list --with-plugin
This will display all routes register with whole application (teelscope, horizon, ignition and other plugin routes etc).

@julienbourdeau
Copy link

I agree that with Telescope, Horizon or Nova routes, you don't really use them often, but many packages add routes to your app that you're going to use. Then, how do you differentiate them?

@shahvirag
Copy link
Author

I agree that with Telescope, Horizon or Nova routes, you don't really use them often, but many packages add routes to your app that you're going to use. Then, how do you differentiate them?

Agreed.
Is there any better way that we can differentiate our application routes with application routes..
Or at least laravel first party package routes are listed differently.

@stefancroweult
Copy link

stefancroweult commented Jun 26, 2020

Having run into this issue it got me thinking would it be possible to have a method to exclude when using the filter options such as --path?

Similar to how you can exclude search terms in Google by prefixing with a minus symbol ("-excluded") maybe a similar format can be used?

e.g. php artisan route:list --path=-telescope

I realise that URLs have dashes in them but must be rare people would start with the dash?

@Michael-Stokoe
Copy link

Michael-Stokoe commented Jun 26, 2020

@stefancroweult
Copy link

Sorry I may not have been clear - I meant enhancing the current filters, including --path, to allow negation symbols.

So if I wanted all routes except /telescope I could do --path=-/telescope (note the - before /telescope)

@Michael-Stokoe
Copy link

Michael-Stokoe commented Jun 26, 2020

Then build it and create the PR?

You could add a "not" option. Which removes items from the array if their path matches the given pattern[s]?

It's really not difficult.

@stevenweirultimate
Copy link

Then build it and create the PR?

You could add a "not" option. Which removes items from the array if their path matches the given pattern[s]?

It's really not difficult.

But isn't this an Ideas board for discussing...."ideas".... 0_o

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants