@php $settings = \Illuminate\Support\Facades\Cache::get('settings'); $footerText = isset($settings) ? $settings->filter(function ($i) { return $i->key === 'FOOTER_TEXT'; })->first() : null; $facebook = isset($settings) ? $settings->filter(function ($i) { return $i->key === 'FACEBOOK_URL'; })->first() : null; $twitter = isset($settings) ? $settings->filter(function ($i) { return $i->key === 'TWITTER_URL'; })->first() : null; $instagram = isset($settings) ? $settings->filter(function ($i) { return $i->key === 'INSTAGRAM_URL'; })->first() : null; $linkedin = isset($settings) ? $settings->filter(function ($i) { return $i->key === 'LINKEDIN_URL'; })->first() : null; $youtube = isset($settings) ? $settings->filter(function ($i) { return $i->key === 'YOUTUBE_URL'; })->first() : null; $footerMenu = isset($settings) ? $settings->filter(function ($i) { return $i->key === 'FOOTER_MENU_DATA'; })->first() : null; $footerMenuData = $footerMenu && !empty($footerMenu->value) ? json_decode($footerMenu->value, true) : null; // Mevcut dil bilgisini al $currentLocale = app()->getLocale(); // Çok dilli veri yapısından mevcut dildeki veriyi çek $currentFooterData = null; if (is_array($footerMenuData) && isset($footerMenuData[$currentLocale])) { $currentFooterData = $footerMenuData[$currentLocale]; } elseif (is_array($footerMenuData) && isset($footerMenuData['en'])) { // Eğer mevcut dil yoksa İngilizce'yi fallback olarak kullan $currentFooterData = $footerMenuData['en']; } // Mevcut dildeki verileri çek $footerInfo = is_array($currentFooterData) && isset($currentFooterData['footer_info']) ? $currentFooterData['footer_info'] : null; $footerSections = is_array($currentFooterData) && isset($currentFooterData['footer_sections']) ? $currentFooterData['footer_sections'] : []; $footerContact = is_array($currentFooterData) && isset($currentFooterData['footer_contact']) ? $currentFooterData['footer_contact'] : null; $footerBottomLinks = is_array($currentFooterData) && isset($currentFooterData['footer_bottom_links']) ? $currentFooterData['footer_bottom_links'] : []; $darkLogo = $globalSettings['ADMIN_LOGO_DARK']; $whiteLogo = $globalSettings['ADMIN_LOGO_LIGHT']; @endphp