withRouting( web: __DIR__ . '/../routes/domains.php', commands: __DIR__ . '/../routes/console.php', health: '/up', ) ->withMiddleware(function (Middleware $middleware) { if (env('BASIC_AUTH_ENABLED', true)) { $middleware->web(\App\Http\Middleware\BasicAuthMiddleware::class); } }) ->withExceptions(function (Exceptions $exceptions) { // })->create();