Files
ladill-transfer/bootstrap/app.php
T
isaaccladandClaude Opus 4.8 c9994129dc
Deploy Ladill Transfer / deploy (push) Successful in 36s
Add branded boot splash (Ladill Mail style) on app pages
InjectBootSplash middleware shows a self-branded loading splash once per session
while the app boots, then fades out.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 22:16:01 +00:00

34 lines
1.4 KiB
PHP

<?php
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use Illuminate\Http\Request;
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: __DIR__.'/../routes/web.php',
api: __DIR__.'/../routes/api.php',
commands: __DIR__.'/../routes/console.php',
health: '/up',
)
->withMiddleware(function (Middleware $middleware): void {
$middleware->redirectGuestsTo(fn (Request $request) => route('sso.connect', [
'redirect' => $request->fullUrl(),
]));
// NOTE: Middleware::alias() REPLACES the alias map (it is not additive), so every alias must be
// registered in a single call. Splitting these into two alias() calls drops 'auth.service' and
// breaks all service-to-service routes (auth.service:transfer) with "Target class does not exist".
$middleware->alias([
'auth.service' => \App\Http\Middleware\AuthenticateService::class,
'platform.session' => \App\Http\Middleware\EnsurePlatformSession::class,
]);
$middleware->web(append: [
\App\Http\Middleware\InjectBootSplash::class,
\App\Http\Middleware\SetActingAccount::class,
]);
})
->withExceptions(function (Exceptions $exceptions): void {
//
})->create();