Health check
Hi,
As for the official documentation on Routing, it seems that you can add the route in bootstrap/app.php
. So the code in app.php would be:
<?php
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: __DIR__.'/../routes/web.php',
api: __DIR__.'/../routes/api.php',
commands: __DIR__.'/../routes/console.php',
channels: __DIR__.'/../routes/channels.php',
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
//
})
->withExceptions(function (Exceptions $exceptions) {
//
})->create();
















Does this replace everything already there? Am I supposed to merge them somehow?
Edit: to merge them both enter this at top of file and keep the rest the same
use Illuminate\Foundation\Application;
$app = Application::configure(basePath: $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__))
->withRouting(health: '/up')->create();