@php if (app()->getLocale() === 'en' && !session()->has('locale')) { $effectiveLocale = \Illuminate\Support\Facades\Cache::get('frontend_default_locale') ?: (\Illuminate\Support\Facades\Schema::hasTable('languages') ? \App\Models\Language::where('is_default', true)->value('code') : null) ?: 'tr'; app()->setLocale($effectiveLocale); \Carbon\Carbon::setLocale($effectiveLocale); } @endphp
@php $userAg = (string) request()->userAgent(); $isMobileAppWebView = str_contains($userAg, 'FitnessApp') || str_contains($userAg, 'WiseTicaretApp') || str_contains($userAg, 'MobileApp'); $mobileAppModuleActive = file_exists(base_path('Plugins/MobileApp/plugin.json')) && app(\App\Services\PluginManager::class)->isActive('MobileApp'); $smartBannerSetting = \App\Models\Store::getSetting('mobile_app_smart_banner_enabled'); $isSmartBannerActive = $mobileAppModuleActive && ($smartBannerSetting === '1' || $smartBannerSetting === 1 || $smartBannerSetting === true || $smartBannerSetting === 'true'); $iosAppId = null; if ($isSmartBannerActive) { $iosAppInput = \App\Models\Store::getSetting('mobile_app_ios_id') ?: \App\Models\Store::getSetting('ios_app_id'); if ($iosAppInput) { if (preg_match('/id(\d+)/', (string) $iosAppInput, $matches)) { $iosAppId = $matches[1]; } elseif (preg_match('/^\d+$/', trim((string) $iosAppInput))) { $iosAppId = trim((string) $iosAppInput); } } if (!$iosAppId) { $appStoreUrl = \App\Models\Store::getSetting('mobile_app_app_store_url'); if ($appStoreUrl && preg_match('/id(\d+)/', (string) $appStoreUrl, $idMatches)) { $iosAppId = $idMatches[1]; } else { $rawFooterApps = \App\Models\Store::getSetting('theme_footer_mobile_app_links'); $parsedFooterApps = is_array($rawFooterApps) ? $rawFooterApps : ($rawFooterApps ? json_decode($rawFooterApps, true) : []); $appStoreConfig = collect($parsedFooterApps)->firstWhere('platform', 'app_store'); if (!empty($appStoreConfig['url']) && preg_match('/id(\d+)/', (string) $appStoreConfig['url'], $idMatches)) { $iosAppId = $idMatches[1]; } } } } @endphp @if($isSmartBannerActive && !empty($iosAppId) && !$isMobileAppWebView) @endif @php $activeStores = $activeStores ?? collect(); $currentActiveStore = $currentActiveStore ?? $activeStores->first(); $currentStoreSettings = $currentStoreSettings ?? (is_array($currentActiveStore->settings ?? null) ? $currentActiveStore->settings : []); $siteName = \App\Models\Store::getSetting('site_name') ?: config('app.name', 'WiseTicaret'); $siteTitle = \App\Models\Store::getSetting('site_title') ?: $siteName; $metaTags = \App\Models\Store::getSetting('meta_tags') ?? ''; $metaDesc = \App\Models\Store::getSetting('meta_description') ?? ''; $ogImage = \App\Models\Store::getSetting('og_image') ?? ''; $changeTitleOnBlur = \App\Models\Store::getSetting('change_title_on_blur') === '1'; $blurTitle = \App\Models\Store::getSetting('blur_title'); $isHomePage = request()->is('/') || request()->routeIs('home'); if ($isHomePage) { $computedTitle = $siteTitle; $computedMetaDesc = $metaDesc; } else { $rawYieldTitle = trim($__env->yieldContent('title')); if ($rawYieldTitle && !in_array(mb_strtolower($rawYieldTitle), ['anasayfa', mb_strtolower(__('default.home_title'))], true)) { if (str_contains(mb_strtolower($rawYieldTitle), mb_strtolower($siteName))) { $computedTitle = $rawYieldTitle; } else { $computedTitle = $rawYieldTitle . ' - ' . $siteName; } } else { $computedTitle = $siteTitle; } $rawYieldMetaDesc = trim($__env->yieldContent('meta_description')); $computedMetaDesc = $rawYieldMetaDesc ?: $metaDesc; } $computedTitle = html_entity_decode(html_entity_decode($computedTitle, ENT_QUOTES | ENT_HTML5, 'UTF-8'), ENT_QUOTES | ENT_HTML5, 'UTF-8'); $computedMetaDesc = html_entity_decode(html_entity_decode(trim(preg_replace('/\s+/', ' ', strip_tags($computedMetaDesc))), ENT_QUOTES | ENT_HTML5, 'UTF-8'), ENT_QUOTES | ENT_HTML5, 'UTF-8'); $footerSocialStr = \App\Models\Store::getSetting('theme_footer_social_links'); $footerSocialsData = is_array($footerSocialStr) ? $footerSocialStr : ($footerSocialStr ? json_decode($footerSocialStr, true) : []); $sameAsLinks = []; foreach($footerSocialsData as $soc) { if(!empty($soc['enabled']) && !empty($soc['url']) && $soc['url'] !== '#') { $sameAsLinks[] = $soc['url']; } } $contactPhone = \App\Models\Store::getSetting('contact_phone') ?: ''; $contactAddress = \App\Models\Store::getSetting('contact_address') ?: ''; $storeLogo = \App\Models\Store::getSetting('theme_header_logo') ?: $ogImage; $schemaGraph = [ [ '@type' => 'WebSite', '@id' => url('/') . '/#website', 'url' => url('/'), 'name' => $siteName, 'description' => $metaDesc, 'potentialAction' => [ '@type' => 'SearchAction', 'target' => url('/kategori') . '?search={search_term_string}', 'query-input' => 'required name=search_term_string' ] ], array_filter([ '@type' => 'OnlineStore', '@id' => url('/') . '/#organization', 'name' => $siteName, 'url' => url('/'), 'logo' => $storeLogo ? asset($storeLogo) : null, 'image' => $storeLogo ? asset($storeLogo) : null, 'telephone' => $contactPhone, 'address' => [ '@type' => 'PostalAddress', 'streetAddress' => $contactAddress, 'addressLocality' => 'Karşıyaka', 'addressRegion' => 'İzmir', 'addressCountry' => 'TR' ], 'sameAs' => count($sameAsLinks) > 0 ? array_values($sameAsLinks) : null ]) ]; $schemaJson = json_encode(['@context' => 'https://schema.org', '@graph' => $schemaGraph], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT); @endphp{{ $notification->data['message'] ?? __('account.new_notification_msg') ?? 'Yeni bildiriminiz var.' }}
{{ $notification->created_at->diffForHumans() }}{{ session('error') }}