@extends('frontend.layout') @section('title', 'Compliances') @section('content') @php // Extract sections from the page data $contentFormSection = $page->sections->firstWhere('section_name', 'service_content_form_section'); $whySection = $page->sections->firstWhere('section_name', 'service_why_section'); $iconBoxSection = $page->sections->firstWhere('section_name', 'service_icon_box'); $parallaxSection = $page->sections->firstWhere('section_name', 'parallax_section'); $blogSection = $page->sections->firstWhere('section_name', 'home_blog_section'); @endphp @if($contentFormSection) {{ $contentFormSection->section_json['sub_heading'] }} {{ $contentFormSection->section_json['heading'] }} {{ $contentFormSection->section_json['paragraph'] }} @for($i = 0; $i < 3; $i++) @if(!empty($contentFormSection->section_json["list_$i"])) {{ $contentFormSection->section_json["list_$i"] }} @endif @endfor @csrf {{ $contentFormSection->section_json['form_heading'] }} {{ $contentFormSection->section_json['form_sub_heading'] }} {{ $contentFormSection->section_json['form_button_text'] }} @endif @if($whySection && !empty($whySection->section_table)) {{ $whySection->section_json['sub_heading'] }} {{ $whySection->section_json['heading'] }} @foreach($whySection->section_table as $item) @if(is_array($item) && !empty($item['title'])) {{ $item['title'] }} {{ $item['paragraph'] }} @if(!empty($item['icon'])) @endif @endif @endforeach @endif @if($parallaxSection) {{$parallaxSection->section_json['heading']}} {{$parallaxSection->section_json['paragraph']}} @endif @if($iconBoxSection && !empty($iconBoxSection->section_table)) {{$iconBoxSection->section_json['heading']}} @foreach($iconBoxSection->section_table as $item) @if(is_array($item) && !empty($item['title'])) @if(!empty($item['icon'])) @endif {{ $item['title'] }} {{ $item['paragraph'] }} @endif @endforeach @endif @if($blogSection) {{ $blogSection->section_json['heading'] }} {{ $blogSection->section_json['sub_heading'] }} @forelse($blogs as $blog) @php $created_at = \Carbon\Carbon::parse($blog->created_at)->format('d M Y'); @endphp {{$created_at}} @if($blog->tags) @php $tags = explode(',', $blog->tags); @endphp @foreach($tags as $tag) {{$tag}} @endforeach @endif {{$blog->title}} @endforeach @endif @endsection
{{ $contentFormSection->section_json['paragraph'] }}
{{ $contentFormSection->section_json['form_sub_heading'] }}
{{ $item['paragraph'] }}
{{$parallaxSection->section_json['paragraph']}}
{{ $blogSection->section_json['sub_heading'] }}