@extends('frontEnd.layouts.Fmaster') @section('FrontCss') @endsection @section('FrontContent')

{{ __('services.title') }}

{{ __('services.subtitle') }}

@foreach ($services as $service) @php $locale = app()->getLocale(); // لو الخدمة مستخدمة Spatie Translatable: if (method_exists($service, 'getTranslation')) { // اسم الخدمة حسب اللغة الحالية $serviceName = $service->getTranslation('name', $locale) ?: $service->getTranslation('name', 'ar') ?: 'Service'; // الملاحظات (لو مترجمة) – لو فاضية هنجيب النص الافتراضي من ملف الترجمة $serviceNotes = $service->getTranslation('notes', $locale) ?: __('services.default_notes'); } else { // fallback لو مش Spatie (لو مجرد JSON عادي) $rawName = $service->name; $name = is_string($rawName) ? json_decode($rawName, true) : (array) $rawName; $serviceName = $name[$locale] ?? ($name['ar'] ?? ($name['en'] ?? 'Service')); $rawNotes = $service->notes; $notes = is_string($rawNotes) ? json_decode($rawNotes, true) : (array) $rawNotes; $serviceNotes = $notes[$locale] ?? __('services.default_notes'); } @endphp
{{ $serviceName }}
${{ $service->price }}
{{ __('services.duration') }}: {{ $service->duration_value }} {{ $service->duration_unit }}
{{ __('services.featured_badge') }}

{{ $serviceNotes }}

@endforeach
@endsection @section('FrontJs') @endsection