@extends('layouts.app') @section('title', $post->title . ' - ' . __('Blog')) @section('content') {{-- Breadcrumb --}}
{{-- Cover Image --}} @if($post->cover_image_exists)
{{ $post->title }}
@endif {{-- Article --}}
{{-- Meta --}}
@if($post->category) {{ $post->category->name }} @endif @if($post->reading_time_minutes) · {{ $post->reading_time_minutes }} {{ __('min read') }} @endif
{{-- Title --}}

{{ $post->title }}

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

{{ $post->excerpt }}

@endif {{-- Author + Tags --}}
@if($post->author)
{{ mb_substr($post->author->name, 0, 1) }}

{{ $post->author->name }}

{{ __('Author') }}

@endif @if($post->tags->count() > 0)
@foreach($post->tags as $tag) #{{ $tag->name }} @endforeach
@endif
{{-- Content --}}
{!! $post->content !!}
{{-- Share --}} {{-- Back --}}
{{-- Related Posts --}} @php $relatedPosts = \App\Models\BlogPost::published() ->where('id', '!=', $post->id) ->when($post->tags->count() > 0, fn($q) => $q->whereHas('tags', fn($tq) => $tq->whereIn('blog_tags.id', $post->tags->pluck('id')))) ->with(['author', 'category']) ->take(3) ->get(); @endphp @if($relatedPosts->count() > 0)

{{ __('Keep Reading') }}

{{ __('Related Articles') }}

@foreach($relatedPosts as $related)
@if($related->category) {{ $related->category->name }} @endif

{{ $related->title }}

{{ __('Read More') }}
@endforeach
@endif @endsection @push('styles') @endpush