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
Calling Artisan::call('route:list') produces an error #50782
Comments
@esbenp are you trying this in the web route or API route? |
This is in the web route but with sanctum like this (abbreviated)
|
I'm not sure it makes sense to call this command in that way. |
So i have a web page where i can experiment with the API that works and is a great timesaver, but I thought It would be nice to list out the defined API routes in the browser so I dont have to look that up. So for my app this makes perfect sense. I do capture the output and presetnt that in my api tester page and everything works, but this also generates the exception as a side effect. I PRESENTED THE MINIMAL EXAMPLES TO REPORDUCE the issue, not what I do exactly in my app. |
Laravel Version
11.1.0
PHP Version
8.2.17
Database Driver & Version
No response
Description
When i run
Artisan::call('route:list')
from a controller I get an error saying
Target class [web] does not exist.
but if i capture the output with a BufferedOutput the contents of output is the expected value.Looks like the command is trying resolve the 'web' middleware and that results in a BindingResolutionException.
Is this a bug or a usage error from my side?
Steps To Reproduce
The text was updated successfully, but these errors were encountered: