@extends('theme1.layouts.app') @section('title') {!! $postDetail->title !!} @endsection @section('meta_image') {{ $postDetail->post_image }} @endsection @section('meta_tags') {!! $postDetail->keywords !!} @endsection @section('meta_description') {!! $postDetail->description !!} @endsection @section('content') @php $settings = getSettingValue(); @endphp

{!! $postDetail->title !!}

{{ ucfirst(__('messages.common.' . strtolower($postDetail->created_at->format('F')))) }} {{ $postDetail->created_at->format('d, Y') }}
{{ getReadingTime($postDetail->postArticle?->article_content ? $postDetail->postArticle->article_content : $postDetail->description) }}
{{ getPostViewCount($postDetail->id) . ' ' . __('messages.details.views') }}

{!! $postDetail->description !!}

@if (isset($postDetail->postAudios->audio_content)) {!! $postDetail->postAudios->audio_content !!} @endif

@if ($postDetail->rss_id != null) @if ($postDetail->rssFeed->show_btn == \App\Models\RssFeed::YES) @endif @endif @if ($postDetail->optional_url != null) @endif
@if ($postDetail->additional_image)

{{ __('messages.common.images') }}

@foreach ($postDetail->additional_image as $image)
@endforeach
@endif @if (!empty($postDetail->post_file) && count($postDetail->post_file))

{{ __('messages.common.files') }}

@foreach ($postDetail->post_file as $file) @endforeach
@endif
{{-- @if (!empty($postDetail->tags))
@foreach (explode(',', $postDetail->tags) as $tags) {!! $tags !!} @endforeach
@endif --}} @if (!empty($postDetail->tags))
@php $tagsArray = is_array($postDetail->tags) ? $postDetail->tags : explode(',', $postDetail->tags); @endphp @foreach ($tagsArray as $tags) {!! $tags !!} @endforeach
@endif
@if (getSettingValue()['emoji_system']) @endif
@if (getSettingValue()['facebook'] || getSettingValue()['twitter'] || getSettingValue()['linkedin'] || getSettingValue()['reddit'] || getSettingValue()['whatsapp'] )
@endif
{{ __('messages.comment.post_a_comment') }}
@csrf @if (!Auth::check())
@endif
@if ($showCaptcha == '1')
@endif
@foreach ($comments as $comment)

{{ $comment->name }}

{{ $comment->created_at->diffForHumans() }}

{!! $comment->comment !!}

@if (Auth::check() && $comment->user_id == getLogInUser()->id)
@endif
@endforeach
@include('theme1.advertiesment.detail-side')
@if (!empty(array_filter(getPopularNews()))) @include('theme1.most_read', [ 'popularNews' => array_slice(getPopularNews(), 0, 4), ]) @endif
@include('theme1.popular_tag')
@if (count(getRecommendedPost()) > 0)
@include('theme1.recommended', [ 'getRecommendedPost' => getRecommendedPost()->take(5), ])
@endif
@include('theme1.advertiesment.detail-side')
@if ($relatedPosts->count() > 0)

{{ __('messages.details.related_post') }}

@foreach ($relatedPosts as $relatedPost)

{!! $relatedPost['title'] !!}

{{ ucfirst(__('messages.common.' . strtolower($relatedPost['created_at']->format('M')))) }} {{ $relatedPost['created_at']->format('d, Y') }}
{{ getReadingTime($postDetail->postArticle?->article_content ? $postDetail->postArticle->article_content : $postDetail->description) }}
@if ($loop->iteration >= 6) @break @endif @endforeach
@endif @include('theme1.advertiesment.post-details') @include('theme1.layouts.detailPages.template.template') @endsection