How to check Laravel health with route

bootstrap/app.php

return Application::configure(basePath: dirname(__DIR__))
    ->withRouting(
        web: __DIR__.'/../routes/web.php',
        commands: __DIR__.'/../routes/console.php',
        health: '/up',
    )
    ->withMiddleware(function (Middleware $middleware) {
        //
    })
    ->withExceptions(function (Exceptions $exceptions) {
        //
    })->create();

Laravel directory structure

  1. app => core code
  2. bootstrap => boot & cache
  3. config => configuration files
  4. database => migrations, factories, seeders
  5. public => entry point for all requests
  6. resources => assets & views
  7. routes => web, console, api, channels
  8. storage => logs, compiled Blade templates, file based sessions, file caches
  9. tests => Pest / PHPUnit tests
  10. vendor => Composer dependencies