Contents
min read
@php $placeholder = 'https://via.placeholder.com/1400x600/1e293b/ffffff?text=No+Image'; $imageUrl = $placeholder; if (!empty($post->featured_image)) { $fileName = trim($post->featured_image); $imageUrl = url('public/uploads/' . $fileName); } else { $imageUrl = 'https://via.placeholder.com/600x400'; } $wordCount = str_word_count(strip_tags($post->content)); $readingTime = ceil($wordCount / 200); @endphp
{{ $post->title }}
@auth
@endauth
🌙
☀️
{{ \Carbon\Carbon::parse($post->published_at)->format('F d, Y') }}
{{ number_format($post->views) }} views
min read
@if(isset($post->category))
{{ $post->category }}
@endif
@if(isset($post->image_caption))
{{ $post->image_caption }}
@endif
{!! $post->content !!}
@if(isset($post->tags) && !empty($post->tags))
@foreach(explode(',', $post->tags) as $tag)
#{{ trim($tag) }}
@endforeach
@endif
Share:
Table of Contents
Contents
min read