@inject('termHelper', 'App\Helpers\TermHelper')
@inject('postHelper', 'App\Helpers\PostHelper')
@php $posts->each(function ($posts) {$posts->load('categories'); }); @endphp
@if($posts->isNotEmpty())
@if ($active)
@if($countRelatedPost > 1)
@if($widgetData['title'] && Arr::exists($widgetData['title'], LaravelLocalization::getCurrentLocale()))
{{ $widgetData['title'][LaravelLocalization::getCurrentLocale()] }}
@endif
@endif
@empty($posts)
@else
@foreach ( $posts as $post)
@if ($mainPostTitle !== $post->post_title)
@if($post->categories->first() AND $post->categories->first()->name)
@endif
{{ $post->created_at->locale(LaravelLocalization::getCurrentLocale())->isoFormat('LL') }}
@endif
@endforeach
@endempty
@endif
@endif