@php use App\Models\Setting; use App\Models\Category; // إعدادات عامة $siteName = Setting::getValue('site_name', 'نظام مقالاتي'); $siteLogo = Setting::getValue('site_logo'); $themeColor = Setting::getValue('theme_color', '#c52127'); $fontFamily = Setting::getValue('font_family', 'Tajawal'); // روابط الأقسام $navCats = Category::with(['children' => function($q){ $q->where('active', 1)->orderBy('order'); }]) ->whereNull('parent_id') ->where('active', 1) ->orderBy('order') ->get(); @endphp
{{-- 🔹 شعار الموقع --}} @if($siteLogo) @php // ✅ تنظيف المسار لتجنب التكرار $cleanLogo = str_replace(['//', 'storage/storage'], ['/', 'storage'], $siteLogo); // ✅ إذا يحتوي على 'storage/uploads' نستخدم asset() $logoUrl = Str::contains($cleanLogo, 'storage/') ? asset($cleanLogo) : Storage::url($cleanLogo); @endphp {{ $siteName }} @endif {{ $siteName }} {{-- 🔍 البحث (للحواسيب فقط) --}} {{-- 🌐 روابط التنقل (سطح المكتب) --}} {{-- 📱 زر القائمة في الجوال --}}
{{-- 📱 القائمة المنسدلة (للهواتف) --}}
@foreach($navCats as $cat) {{ $cat->name }} @endforeach ✍️ كتّابنا {{-- 🔍 البحث الصغير في القائمة --}}