@php $faviconHref = null; $faviconType = 'image/x-icon'; if (!empty($page->favicon)) { $faviconHref = \Illuminate\Support\Str::startsWith($page->favicon, 'http') ? $page->favicon : asset($page->favicon); $faviconExt = strtolower(pathinfo($page->favicon, PATHINFO_EXTENSION)); $faviconType = [ 'png' => 'image/png', 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg', 'gif' => 'image/gif', 'webp' => 'image/webp', 'svg' => 'image/svg+xml', 'ico' => 'image/x-icon', ][$faviconExt] ?? 'image/x-icon'; } @endphp @if($faviconHref) @else @endif