{{-- resources/views/web/visas/show.blade.php --}} @extends('web.layouts.app') @php $siteName = config('app.name', 'البطل الروماني'); $title = ($visa->name_ar ?? $visa->country_name ?? $visa->name_en ?? 'تفاصيل الفيزا'); $slug = $visa->slug ?? \Illuminate\Support\Str::slug($visa->name_en ?? $visa->name_ar ?? 'visa'); $region = $visa->region ?? null; // تنسيق السعر $fmtPrice = function ($amount) { if ($amount === null || $amount === '') return 'السعر حسب الحالة'; return number_format((float)$amount, 0) . ' ر.س'; }; // صورة الغلاف $heroImg = null; // الأولوية: صورة الفيزا الخاصة if (!empty($visa->cover_image)) { $heroImg = $visa->cover_image; } elseif (!empty($visa->image_url)) { $heroImg = $visa->image_url; } // إذا لم توجد صورة خاصة، استخدم الصورة العامة للفيزات if (!$heroImg && !empty($settings['hero_visas'])) { $heroImg = $settings['hero_visas']; } // إذا لم توجد، استخدم الصورة الرئيسية للموقع if (!$heroImg && !empty($settings['hero_image'])) { $heroImg = $settings['hero_image']; } // معالجة الصورة - إذا كانت مسار محلي if ($heroImg && !\Illuminate\Support\Str::startsWith($heroImg, ['http://', 'https://'])) { if (\Illuminate\Support\Facades\Storage::exists($heroImg)) { $heroImg = \Illuminate\Support\Facades\Storage::url($heroImg); } else { $heroImg = asset($heroImg); } } // العلم $flag = null; if ($slug) { $trySvg = public_path('images/flags/'.$slug.'.svg'); $tryPng = public_path('images/flags/'.$slug.'.png'); $flag = file_exists($trySvg) ? asset('images/flags/'.$slug.'.svg') : (file_exists($tryPng) ? asset('images/flags/'.$slug.'.png') : null); } // أنواع الفيزا $visaTypesVal = $visa->visa_types ?? []; $visaTypesArr = is_string($visaTypesVal) ? (json_decode($visaTypesVal, true) ?: []) : (is_array($visaTypesVal) ? $visaTypesVal : []); $visaTypeLabels = [ 'tourist' => 'فيزا سياحية', 'business' => 'فيزا عمل', 'student' => 'فيزا طالب', 'transit' => 'فيزا ترانزيت', 'family' => 'فيزا عائلية', 'medical' => 'فيزا علاجية', ]; // البيانات الأساسية $processing = $visa->processing_time_text ?? null; $priceFrom = $visa->price_from ?? null; $requirementsHtml = $visa->requirements_richtext ?? ($visa->requirements_html ?? null); $faqsVal = $visa->faqs ?? []; $faqsArr = is_string($faqsVal) ? (json_decode($faqsVal, true) ?: []) : (is_array($faqsVal) ? $faqsVal : []); // واتساب $wa = $visa->whatsapp ?? ($settings['whatsapp'] ?? null); $waLink = $wa ? 'https://wa.me/'.preg_replace('~\D~', '', $wa) : null; // الروابط $indexUrl = route('visas.index'); $showUrl = route('visas.show', $slug); // استخدام رابط بديل إذا كان visas.apply غير معرّف try { $applyUrl = route('visas.apply', $slug); } catch (Exception $e) { $applyUrl = $waLink ?: url('/contact'); } // SEO $metaTitle = $title . ' - ' . $siteName; $metaDesc = 'كل ما تحتاج معرفته عن فيزا ' . $title . ' من ' . $siteName . ' (المدّة، المتطلبات، السعر، ونصائح مهمة).'; @endphp @section('title', $metaTitle) @push('meta') @endpush @push('styles') @endpush @section('content') {{-- البنر --}}
@if($flag) {{ $title }} @endif

{{ $title }}

@if($region) {{ $region }} @endif @foreach($visaTypesArr as $t) {{ $visaTypeLabels[$t] ?? $t }} @endforeach
{{-- المحتوى الرئيسي --}}
{{-- العمود الرئيسي --}}
{{-- معلومات سريعة --}}
مدة المعالجة
{{ $processing ?? 'حسب السفارة' }}
السعر الابتدائي
{{ $fmtPrice($priceFrom) }}
أنواع الفيزا
{{ count($visaTypesArr) }}
{{-- الوصف --}} @if(!empty($visa->short_description))

نظرة عامة

{!! $visa->short_description !!}
@endif
{{-- أنواع الفيزا --}} @if(!empty($visaTypesArr))

أنواع التأشيرات المتاحة

@foreach($visaTypesArr as $t)
{{ $visaTypeLabels[$t] ?? $t }}
@endforeach
@endif {{-- خطوات التقديم --}}

خطوات التقديم

1
تعبئة النموذج

املأ بياناتك ومعلومات السفر

2
رفع المستندات

أرفق جميع المستندات المطلوبة

3
المراجعة والدفع

راجع البيانات وادفع الرسوم

4
استلام الفيزا

احصل على الفيزا في وقت قياسي

{{-- المتطلبات --}}

المتطلبات والمواعيد المطلوبة

{!! $requirementsHtml ?? '

سيتم تحديث متطلبات هذه الدولة قريباً.

' !!}
{{-- الأسئلة الشائعة --}} @if(!empty($faqsArr))

الأسئلة الشائعة

@foreach($faqsArr as $i=>$f) @php $qid = 'q'.$i; $q = (is_array($f) ? ($f['q'] ?? $f['question'] ?? '') : ''); $a = (is_array($f) ? ($f['a'] ?? $f['answer'] ?? '') : ''); @endphp @if(!empty($q) && !empty($a))

{!! $a !!}
@endif @endforeach
@endif
{{-- الشريط الجانبي - تم إصلاح النصوص هنا --}}
{{-- طلب الفيزا - النصوص مصححة --}}
تقديم طلب التأشيرة

نساعدك خطوة بخطوة.

{{-- ملخص سريع - النصوص مصححة --}}
ملخص الطلب
الدولة: {{ $title }}
@if($region)
المنطقة: {{ $region }}
@endif
السعر: {{ $fmtPrice($priceFrom) }}
@if($processing)
مدة المعالجة: {{ $processing }}
@endif
{{-- روابط سريعة --}}
{{-- فيزا مشابهة --}} @isset($related) @if(count($related))

دول أخرى قد تهمك

@endif @endisset
@endsection