@extends('user.layout') @section('title', 'Page Title') @section('content') @php // Contact details for the sidebar. $telContact = \App\Models\ContactInfo::first(); $telPhone = ($telContact && !empty($telContact->phone[0])) ? $telContact->phone[0] : '+8801325074113'; $telWhatsapp = preg_replace('/\D+/', '', $telPhone); // Turn a "FAQ" block in section six into question/answer pairs. // Used only when the block starts with "FAQ" or "Frequently Asked" and has 2+ questions ending in "?". $telFaq = []; $telSixHtml = (string) ($service->section_six_description ?? ''); if (trim(strip_tags($telSixHtml)) !== '' && class_exists('DOMDocument')) { $telDom = new \DOMDocument(); $telPrev = libxml_use_internal_errors(true); $telLoaded = $telDom->loadHTML('
' . preg_replace('#]*>#i', '', $telSixHtml) . '
', LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); libxml_clear_errors(); libxml_use_internal_errors($telPrev); $telRoot = $telLoaded ? $telDom->getElementById('tel-faq-root') : null; if ($telRoot) { $telClean = fn ($s) => trim(preg_replace('/\s+/u', ' ', str_replace(["\xC2\xA0", "\u{200B}"], [' ', ''], $s))); $telNodes = []; foreach ($telRoot->childNodes as $telNode) { if ($telNode->nodeType === XML_ELEMENT_NODE && in_array(strtolower($telNode->nodeName), ['style', 'script'])) continue; if ($telClean($telNode->textContent) === '') continue; $telNodes[] = $telNode; } if ($telNodes && preg_match('/^(faq|frequently asked)/i', $telClean($telNodes[0]->textContent))) { $telCur = null; foreach (array_slice($telNodes, 1) as $telNode) { $telText = $telClean($telNode->textContent); if (str_ends_with($telText, '?') && mb_strlen($telText) <= 200) { if ($telCur) $telFaq[] = $telCur; $telCur = ['q' => $telText, 'a' => '']; } elseif ($telCur) { $telCur['a'] .= $telDom->saveHTML($telNode); } } if ($telCur) $telFaq[] = $telCur; $telFaq = array_values(array_filter($telFaq, fn ($f) => trim(strip_tags($f['a'])) !== '')); if (count($telFaq) < 2) $telFaq = []; } } } @endphp
{{ $service->name }}

#{{ str_replace(' ', '', config('app.name')) }}

{{ $service->name }}

{{ $service->title }}

{!! $service->short_description !!}
@if (filled($service->section_three_image)) {{ $service->section_three_title }} @endif

{{ $service->section_three_title }}

{!! $service->section_three_description !!}

@if (trim(strip_tags((string) $service->section_four_description)) !== '')
{!! $service->section_four_description !!}

@endif
@if (filled($service->section_five_image)) {{ $service->section_five_title }} @endif

{{ $service->section_five_title }}

{!! $service->section_five_description !!}
@if (count($telFaq))

Frequently asked questions

@foreach ($telFaq as $telItem)
first) open @endif> {{ $telItem['q'] }}
{!! $telItem['a'] !!}
@endforeach
@elseif (trim(strip_tags($telSixHtml)) !== '')
{!! $service->section_six_description !!}
@endif
Ready to start your project? Share your drawings or requirements for {{ $service->name }} and get a response from our engineers.

Powered by engineers

Our Services:

@foreach ($services as $sk => $relatedService)
{{ $relatedService->name }}
{{ str_pad($loop->iteration, 2, '0', STR_PAD_LEFT) }}
{{ $relatedService->name }}
View Service
@endforeach

Powered by engineers

News & Blog:

@foreach ($blogs->take(3) as $blog)
{{ $blog->title }}

{{ $blog->created_at->format('d/m/Y') }}

{{ excerpt($blog->title, 70) }}
See More
@endforeach
@if ($blogs->count() >= 4) @php $lastBlog = $blogs[3]; @endphp
{{ $lastBlog->title }}

{{ $lastBlog->created_at->format('d/m/Y') }}

{{ $lastBlog->title }}
See More
@endif
@csrf
@endsection @push('styles') @endpush @push('scripts') @if (count($telFaq)) @endif @endpush