-
Notifications
You must be signed in to change notification settings - Fork 11.4k
Health endpoint is stripped out when defining routes with "using" keywork #55739
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
Comments
That is expected, as per docs:
Reference: https://laravel.com/docs/12.x/routing#routing-customization Apart from |
@rodrigopedra , thanks for finding that piece of documentation. I acknowledge that documentation is clear in that sense. However, the interface of It might be that the health check endpoint is intended as an exception to the rule. Let’s wait for @taylorotwell 's input to see if that was the intended design. I've also created a pull request with a potential solution in case it's decided to treat health as a special case while maintaining consistency with the using approach. |
IMHO, there is no ambiguity, as long one has read the docs. But I also agree it would be a nice addition to allow registering the health route along with the Fingers crossed! |
Laravel Version
12.x
PHP Version
8.4
Database Driver & Version
No response
Description
Laravel comes with a built-in health check endpoint on
/up
, which is defined in thebootstrap/app.php
file as an argument of thewithRouting
method. In specific circumstances, this endpoint is stripped out, in particular, when routes are defined utilizing the "using" parameter as an alternative to "web".Current Behaviour
When running
php artisan route:list
in a fresh Laravel app, you get something similar to the followingWhen defining routes with the "using" parameter, the health check endpoint is removed from the routes, as we can observe by executing the route list again.
Expected Behaviour
The health check endpoint is perverse regardless of the way routes are defined, either utilizing
web
orusing
as an argument forwithRouting
.Steps To Reproduce
Application::configure(...)->withRouting(...)
block:php artisan route:list
and confirm the presence of the /up health check route.php artisan route:list
again.The text was updated successfully, but these errors were encountered: