@extends('frontend.layouts.app') @section('content')

{{ $post->title }}

@if($post->image) {{ $post->title }} @endif
user-circle

{{ $post->category ? $post->category->name : 'Uncategorized' }}

calendar-week

{{ $post->created_at->format('d M Y') }}

{{--
message-circle

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

--}}
@if($post->excerpt)

{{ $post->excerpt }}

@endif
{!! $post->body !!}

Recent Posts

@foreach($allPosts->take(5) as $recentPost) @if($recentPost->id != $post->id) @if($recentPost->image) {{ $recentPost->title }} @else {{ $recentPost->title }} @endif

{{ $recentPost->created_at->format('d M Y') }}

{{ Str::limit($recentPost->title, 50) }}

@endif @endforeach

Categories

@forelse($categories as $category)

{{ $category->name }}

({{ $category->posts()->where('status', 'PUBLISHED')->count() }} posts)
@empty

No categories available

@endforelse
@stop