@extends('layouts.front.home') @section('title') AFAQ @endsection @section('css') @endsection @section('content') @php // Check the current route name $currentRoute = Route::currentRouteName(); if ($currentRoute == 'all-blog') { if (isset($report->blog) && !is_null($report->blog)) { $title = 'Blog'; $category = $report->blog; } } elseif ($currentRoute == 'all-media-center') { if (isset($report->media) && !is_null($report->media)) { $title = 'Media Center'; $category = $report->media; } } else { $title = 'Blog'; $category = $report->blog ?? $report->media; } @endphp

{{ $title }}

@if($category && count($category->sub) > 0)
@foreach($category->sub as $sub_category) @endforeach
@endif
@if($articles && count($articles) > 0) @php $firstArticle = $articles[0]; @endphp @endif
{{--
--}}
@if($articles && count($articles) > 0) @foreach($articles as $index => $article) @if ($index > 0)
{{ $article->created_at->format('M j, Y') }} {{ $article->category?->name ?? '----' }}
{{ $article->title ?? '----' }}

{{ $article->desc ?? '----' }}

@endif @endforeach @endif
{{-- pagination area --}}
@if(isset($recommended_articles) && count($recommended_articles) > 0) @endif
@endsection @section('script') @endsection