Files
ladill-pos/bootstrap/app.php
T
isaaccladandClaude Opus 4.8 2103708ab6
Deploy Ladill POS / deploy (push) Successful in 31s
Add a branded boot splash (Ladill Mail style) to app pages
InjectBootSplash middleware injects a full-screen loading splash — the app's
launcher icon (pulsing), an animated progress bar, and "Loading <app>…" — into
authenticated HTML pages, then fades it out on load. Shows once per browser
session (sessionStorage), so it masks the app's client-side boot without
flashing on every navigation. Self-branding from the app's own subdomain icon,
so the same partial/middleware drops into every Ladill app.

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

30 lines
1021 B
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(),
]));
$middleware->web(append: [
\App\Http\Middleware\SetActingAccount::class,
\App\Http\Middleware\InjectBootSplash::class,
]);
$middleware->alias([
'platform.session' => \App\Http\Middleware\EnsurePlatformSession::class,
]);
})
->withExceptions(function (Exceptions $exceptions): void {
//
})->create();