@php use App\Models\Setting; use Illuminate\Support\Str; // 🧭 إعدادات عامة $siteName = Setting::getValue('site_name', 'نظام مقالاتي'); $siteDesc = Setting::getValue('site_description', ''); $siteLogo = Setting::getValue('site_logo'); $siteEmail = Setting::getValue('contact_email', 'info@kitabatplus.com'); $sitePhone = Setting::getValue('contact_phone', '+1234567890'); // 🌐 روابط التواصل الاجتماعي $social = [ 'facebook' => Setting::getValue('facebook'), 'twitter' => Setting::getValue('twitter'), 'instagram' => Setting::getValue('instagram'), 'youtube' => Setting::getValue('youtube'), 'telegram' => Setting::getValue('telegram'), ]; // 📄 الصفحات الديناميكية $footerPages = \App\Models\Page::where('active', true) ->orderBy('id', 'asc') ->get(['title', 'slug']); // 🖼️ تصحيح رابط الشعار (منع تكرار /storage/) $logoUrl = null; if ($siteLogo) { $cleanLogo = str_replace(['//', 'storage/storage'], ['/', 'storage'], $siteLogo); $logoUrl = Str::contains($cleanLogo, 'storage/') ? asset($cleanLogo) : Storage::url($cleanLogo); } @endphp