@php // Branded boot splash (Ladill Mail style). Resolve this app's icon from the // launcher registry by matching the current host's subdomain, so the icon is // correct even when the subdomain slug differs from the icon filename // (e.g. woo.ladill.com -> woomanager.svg). $sub = strtolower((string) ((explode('.', (string) (parse_url((string) config('app.url'), PHP_URL_HOST) ?: '')))[0] ?? '')); $iconFile = null; foreach ((array) config('ladill_launcher.apps', []) as $app) { $host = (string) (parse_url((string) ($app['url'] ?? ''), PHP_URL_HOST) ?: ''); $appSub = strtolower((string) ((explode('.', $host))[0] ?? '')); if ($appSub !== '' && $appSub === $sub && !empty($app['icon'])) { $iconFile = (string) $app['icon']; break; } } if ($iconFile === null && $sub !== '') { $iconFile = "{$sub}.svg"; } $icon = $iconFile && is_file(public_path("images/launcher-icons/{$iconFile}")) ? "images/launcher-icons/{$iconFile}" : null; $label = (string) config('app.name', 'Ladill'); @endphp
@if ($icon) @endif
Loading {{ $label }}…