@php $currentSlug = trim(request()->path(), '/'); $pageSeo = pageSeo($currentSlug); $defaultSeo = \App\Models\SeoSetting::query()->where('is_active', true)->first(); $seoTitle = $pageSeo?->seo_title ?: $defaultSeo?->title ?: gs()->site_name; $seoDescription = $pageSeo?->seo_description ?: $defaultSeo?->description; $seoKeywords = $pageSeo?->seo_keywords ?: ($defaultSeo?->keywords ?? []); $seoImage = $pageSeo?->seo_image ? previewFile('pageSeo', $pageSeo->seo_image) : ($defaultSeo?->og_image ? previewFile('seoOg', $defaultSeo->og_image) : null); @endphp {{ $seoTitle }} @if($seoImage) @endif