@extends('frontend.layouts.app') @if ($service->meta_title) @section('title', $service->meta_title . ' ' . '-' . ' ' . $setting->site_title) @else @section('title', $setting->bname . ' ' . '-' . ' ' . $service->title) @endif @if ($service->meta_description) @section('description', $service->meta_description) @else @section('description', Str::limit($service->excerpt, 200)) @endif @section('keywords', $service->meta_keyword) @section('content')
{{-- @foreach ($categories as $category)

{{ $category->title }}

    @foreach ($category->services as $srv) @php $scategory = $srv->scategories->last(); // Get the last category for deep-level categories @endphp @if ($scategory)
  • {{ $srv->title }}
  • @endif @endforeach
@if ($category->subcategory->isNotEmpty())
    @foreach ($category->subcategory as $sub) @include('frontend.components.partials.category-list', [ 'category' => $sub, ]) @endforeach
@endif
@endforeach --}} @foreach ($category->subcategory as $category) @if ($category->services->count())

{{ $category->title }}

    @foreach ($category->services as $srv) @php $scategory = $srv->scategories->last(); // Get the last category for deep-level categories @endphp @if ($scategory && $srv->published == '1')
  • {{ $srv->title }}
  • @endif @endforeach
@endif @endforeach
@php // Extract video ID from YouTube URL $videoUrl = $service->video; // change your variable accordingly preg_match( '/(?:https?:\/\/(?:www\.)?youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)([a-zA-Z0-9_-]{11}))/i', $videoUrl, $matches, ); $videoId = $matches[1] ?? null; @endphp @if ($videoId)
@endif

{{ $service->title }}

{!! $service->body !!}

{{--
@comments(['model' => $service])
--}}
@stop @section('css') @stop @section('js') @if ($errors->any()) @endif @stop