@extends('layouts.site') @section('content') @php /**/ [ $name, $email, $phone, $whatsapp, $google_map_url, $addresss, $facebook, $instagram, $twitter, $youtube, $tiktok, ] = getGeneralSettings(); @endphp @php $lang = app()->getLocale(); $name = 'name_' . $lang; $details = 'details_' . $lang; $description = 'description_' . $lang; $question = 'question_' . $lang; $answer = 'answer_' . $lang; $img_alt = 'img_alt_' . $lang; $slug = 'slug_' . app()->getLocale(); // $slug = 'slug_en'; @endphp {{ __('Services') }} {{ __('Home') }} {{ app()->getLocale() == 'ar' ? 'التفاصيل' : 'services details' }} @php $originalUrl = $service->vedio_url; if (strpos($originalUrl, 'youtube.com/shorts/') !== false) { preg_match('/shorts\/([^?]+)/', $originalUrl, $matches); $videoId = $matches[1] ?? ''; $videoUrl = "https://www.youtube.com/watch?v=" . $videoId; } else { $videoUrl = $originalUrl; } @endphp {{ $service->$name }} {!! html_entity_decode($service->$details) !!} @if (isset($service->upload_file) && !empty($service->upload_file)) {{ app()->getLocale() == 'ar' ? 'بروفايل الخدمة' : 'Service Brochure' }} @endif {{ app()->getLocale() == 'ar' ? 'خدماتنا' : 'Services List' }} @php $services = \App\Models\Service::where('is_active', 1)->get(); // dump(" $service->id"); @endphp @if ($services && $services->count() > 0) @foreach ($services as $servicee) {{ $servicee->$name }} @if (app()->getLocale() == 'ar') @else @endif @endforeach @endif {{ app()->getLocale() == 'ar' ? 'بروفايل' : 'Brochure' }} @if (isset($service->upload_file) && !empty($service->upload_file)) {{ app()->getLocale() == 'ar' ? 'بروفايل الخدمة' : 'Service Brochure' }} @endif @php $settings = \App\Models\Setting::first(); $pdf = app()->getLocale() == 'ar' ? asset('assets/images/services_pdf/' . $settings->upload_file) : asset('assets/images/services_pdf/' . $settings->upload_file_en); @endphp {{ app()->getLocale() == 'ar' ? 'بروفايل الشركة' : 'Company Profile' }} @stop @section('scripts') @stop
{!! html_entity_decode($service->$details) !!}