@php $faviconPath = $frontendSettings['site_favicon_path'] ?? null; $faviconUrl = $faviconPath ? asset('storage/' . ltrim((string) $faviconPath, '/')) : asset('favicon.ico'); @endphp @php $manifestPath = public_path('build/manifest.json'); $hotPath = public_path('hot'); $useHot = false; if (file_exists($hotPath)) { $hotUrl = trim((string) @file_get_contents($hotPath)); if ($hotUrl !== '') { $parts = parse_url($hotUrl); $host = $parts['host'] ?? null; $port = $parts['port'] ?? (($parts['scheme'] ?? '') === 'https' ? 443 : 80); if ($host && $port) { $conn = @fsockopen($host, (int) $port, $errno, $errstr, 0.15); if (is_resource($conn)) { fclose($conn); $useHot = true; } } } } $manifest = null; if (! $useHot && file_exists($manifestPath)) { $manifest = json_decode((string) file_get_contents($manifestPath), true) ?: []; } @endphp @if ($useHot) @vite(['resources/css/app.css', 'resources/js/app.js']) @elseif (is_array($manifest)) @if (!empty($manifest['resources/css/app.css']['file'])) @endif @if (!empty($manifest['resources/js/app.js']['file'])) @endif @else @vite(['resources/css/app.css', 'resources/js/app.js']) @endif @if (session('auth_modal')) @endif