@extends('layouts.master') @section('content')
@if ($service->image) @endif
{{ $service->name }}
Rs. {{ $service->price }}   |   {{ $service->duration }} mins
{{ $service->rating ?? '4.85' }}
@php $paragraphs = preg_split( '/]*>(.*?)<\/p>/i', $service->overview, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY, ); $aftercareIndex = array_search( 'Aftercare Tips', array_map('strip_tags', $paragraphs), ); @endphp
{{-- ✅ First section: List with bullets --}}
    @foreach ($paragraphs as $index => $text) @if ($index < $aftercareIndex) @if (!empty(trim(strip_tags($text))))
  • {{ strip_tags($text) }}
  • @endif @endif @endforeach
{{-- ✅ Aftercare Tips Section --}} @if ($aftercareIndex !== false)

Aftercare Tips

    @foreach ($paragraphs as $index => $text) @if ($index > $aftercareIndex) @if (!empty(trim(strip_tags($text))))
  • {{ strip_tags($text) }}
  • @endif @endif @endforeach
@endif
{{-- 💡 How It Works Tab --}}
@foreach ($service->how_it_works ?? [] as $index => $step)
Step {{ $index + 1 }} {{-- Number Badge --}}
{{ $index + 1 }}
{{-- Step Title --}}

{{ $step['title'] }}

@endforeach
{{-- 💬 FAQ Tab --}}
@foreach ($service->faqs ?? [] as $index => $faq)

{{ $faq['answer'] }}
@endforeach

All Services

@foreach (App\Models\Service::take(8)->get() as $s) {{ $s->name }} @endforeach
@endsection