@php $siteName = \App\Models\Setting::where('key', 'store_name')->value('value') ?? config('app.name', 'DigiShop'); $siteDesc = \App\Models\Setting::where('key', 'store_description')->value('value') ?? 'Marketplace produk digital terbaik.'; $appLogo = \App\Models\Setting::where('key', 'app_logo')->value('value'); $favicon = $appLogo ? Storage::url($appLogo) : asset('favicon.ico'); @endphp @yield('title', $siteName) @yield('schema') @vite(['resources/css/app.css', 'resources/js/app.js'])
{{ $slot }}
@php $siteName = \App\Models\Setting::where('key', 'store_name')->value('value') ?? config('app.name', 'DigiShop'); $storeDesc = \App\Models\Setting::where('key', 'store_description')->value('value'); $footerLogoPath = \App\Models\Setting::where('key', 'app_logo')->value('value'); $footerLogoUrl = $footerLogoPath ? Storage::url($footerLogoPath) : null; $footerTagline = \App\Models\Setting::where('key', 'store_tagline')->value('value') ?? ''; $footerCategories = \App\Models\Category::where('is_active', true)->take(6)->get(); $footerPages = \App\Models\Page::where('status', 'published')->take(5)->get(); $storeEmail = \App\Models\Setting::where('key', 'store_email')->value('value') ?? ('support@' . strtolower(str_replace(' ', '', $siteName)) . '.com'); $storeAddress = \App\Models\Setting::where('key', 'store_address')->value('value'); $storePhone = \App\Models\Setting::where('key', 'store_phone')->value('value'); $socialWa = \App\Models\Setting::where('key', 'social_whatsapp')->value('value'); $socialIg = \App\Models\Setting::where('key', 'social_instagram')->value('value'); $socialFb = \App\Models\Setting::where('key', 'social_facebook')->value('value'); @endphp {{-- ============================================================ --}} {{-- PAYMENT LOGOS SECTION --}} {{-- ============================================================ --}} @php $paymentLogosVisible = \App\Models\Setting::where('key', 'payment_logos_is_visible')->value('value'); $paymentLogosVisible = $paymentLogosVisible === null ? '1' : $paymentLogosVisible; @endphp @if($paymentLogosVisible == '1') @php $paymentLogosJson = \App\Models\Setting::where('key', 'payment_logos')->value('value'); $paymentLogos = $paymentLogosJson ? json_decode($paymentLogosJson, true) : []; if (!is_array($paymentLogos)) { $paymentLogos = []; } @endphp @endif