@stack('head') @php use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Storage; use Illuminate\Support\Str; $site = $site ?? DB::table('configs')->first(); $resolve = function (?string $path) { if (!$path) return null; if (Str::startsWith($path, ['http://','https://','//'])) return $path; if (Storage::disk('public')->exists($path)) return Storage::url($path); // /storage/... if (file_exists(public_path($path))) return asset($path); // /public/... return null; }; $logoUrl = $resolve($site->site_logo ?? null); $faviconUrl = $resolve($site->favicon ?? null); @endphp @if($faviconUrl) @endif
@yield('subtitle', 'Admin Portal')