{!! $blog->body !!}
{{ $blog->title }}
@extends('layouts.master') @section('content') @php // Resolve the post image: full URL as-is, public asset path via asset(), // otherwise a storage path. Always falls back to a real bundled image. $img = $blog->image; $blogImg = empty($img) ? asset('assets/images/post-1.jpg') : (\Illuminate\Support\Str::startsWith($img, ['http://', 'https://']) ? $img : (\Illuminate\Support\Str::startsWith($img, 'assets/') ? asset($img) : asset('storage/' . ltrim($img, '/')))); $readingMins = max(1, (int) ceil(str_word_count(strip_tags($blog->body ?? '')) / 200)); @endphp