@extends('layouts.app') @section('metades') @endsection @section('title') {{ $data['metaTitle'] }} @endsection @section('content') @foreach ($data['moduleItems'] as $item) @if ($item['slug'] == 'notice-3')

{{ $item['title'] }}

@if (count($item['dynamicSections']) > 0) {{-- Sort dynamicSections in descending order by 'createdAt' --}} @php $sortedSections = collect($item['dynamicSections'])->sortByDesc('createdAt'); @endphp @foreach ($sortedSections as $dynamicSection)

{{ $dynamicSection['title'] }}

{{ \Carbon\Carbon::parse($dynamicSection['createdAt'])->format('d M Y') }}

@if ($dynamicSection['createdAt'] >= now()->subDays(15)->endOfDay()) @endif
@endforeach @endif
@endif @endforeach @endsection