@php $generaleSetting = App\Models\GeneraleSetting::first(); $title = $generaleSetting?->name ?? config('app.name', 'ReadyEcommerce'); $favicon = $generaleSetting?->favicon ?? asset('assets/favicon.png'); $logo = $generaleSetting?->logo ?? asset('assets/logo.png'); $description = $generaleSetting?->web_footer_description ?? $title; $siteUrl = url('/'); $metaPixelId = $generaleSetting?->meta_pixel_id ?: config('services.meta.pixel_id'); // Tracking stays off until an admin flips the switch, and off on local unless // META_PIXEL_ON_LOCAL is set so the Test Events tool can be used in dev. $metaPixelAllowedHere = ! app()->environment('local') || config('services.meta.pixel_on_local'); $shouldLoadMetaPixel = $metaPixelAllowedHere && filled($metaPixelId) && (bool) $generaleSetting?->meta_pixel_enabled; // Only tells the SPA whether to mirror events to our CAPI endpoint — the token // itself never leaves the server. $metaCapiEnabled = $shouldLoadMetaPixel && filled($generaleSetting?->meta_capi_access_token ?: config('services.meta.capi_access_token')); if (! empty($product)) { $title = $product->name; $description = strip_tags($product->short_description) ?: $title; $logo = $product->thumbnail; $siteUrl = url()->current(); } @endphp {{ $title }} @if ($shouldLoadMetaPixel) @endif @vite('resources/css/app.css') @if ($shouldLoadMetaPixel) @endif
@vite('resources/js/app.js')