@php // الحصول على جميع إعدادات الأقسام النشطة $activeSections = App\Models\HeroSetting::getActiveSections(); // الحصول على اللغة الحالية $currentLocale = app()->getLocale(); @endphp @foreach($activeSections as $sectionId)
@php // تحديد البيانات حسب اللغة الحالية $heroData = App\Models\HeroSetting::getAllSettings($sectionId); // الحصول على بيانات اللغة الحالية $langData = $heroData[$currentLocale] ?? []; // الحصول على الصور $images = $heroData['images'] ?? []; // الحصول على رابط الزر الرئيسي $buttonUrl = $heroData['button_url'] ?? '#'; // الحصول على بيانات زر التواصل - من المصفوفة الفرعية 'contact' $contactUrl = $heroData['contact']['contact_button_url'] ?? ''; $contactText = $langData['contact_button_text'] ?? __('Contact Us'); // الحصول على بيانات الفيديو - من المصفوفة الفرعية 'video' $videoUrl = $heroData['video']['video_url'] ?? ''; // الحصول على عدد الطلاب $studentsCount = $heroData['students_count'] ?? ''; @endphp @if(isset($images['background_mobile']) && !empty($images['background_mobile']))
@else
@endif



{{ $langData['welcome_text'] ?? 'Welcome Text Missing' }}

{{ $langData['title'] ?? '' }}

{{ $langData['subtitle'] ?? '' }}

@if(!empty($contactUrl)) {{ $contactText }} @endif @php // Get video URL based on current language $videoUrl = $currentLocale == 'ar' ? ($heroData['video']['video_url_ar'] ?? '') : ($heroData['video']['video_url'] ?? ''); @endphp @if(!empty($videoUrl)) @endif
@if(empty($contactUrl) && empty($videoUrl)) {{ $langData['button_text'] ?? '' }} @endif

thumb
@if(!empty($studentsCount))

@endif
@endforeach