@vite(['resources/css/app.css', 'resources/js/app.js']) @include('partials.site-styles') @include('partials.page-loader')
@if($post->header_image ?? $post->featured_image)
{{ $post->title }}
@endif
Retour au blog
@if($post->category)
{{ $post->category->name }}
@endif

{{ $post->title }}

{{ $post->published_at ? $post->published_at->format('d M Y') : $post->created_at->format('d M Y') }} {{ $post->user->name ?? 'CEGME' }}
@if($post->excerpt)
{{ $post->excerpt }}
@endif
@php $content = $post->content; // Case 1: Replace hardcoded localhost/127.0.0.1 (http and https) with relative paths // This handles images saved with absolute local URLs when viewing from another device $content = str_replace(['http://localhost:8000/', 'http://127.0.0.1:8000/'], '/', $content); $content = str_replace(['https://localhost:8000/', 'https://127.0.0.1:8000/'], '/', $content); // Case 2: Fix relative storage paths missing leading slash (e.g. src="storage/...") // We use preg_replace to target src attributes starting specifically with "storage/" $content = preg_replace('/src=["\'](storage\/[^"\']+)["\']/', 'src="/$1"', $content); @endphp {!! $content !!}
@if($post->tags->count() > 0)

Mots-clés

@foreach($post->tags as $tag) {{ $tag->name }} @endforeach
@endif

Partager cet article

@if($relatedPosts->count() > 0)

Articles similaires

Découvrez d'autres articles qui pourraient vous intéresser

@foreach($relatedPosts as $relatedPost)
@if($relatedPost->featured_image) {{ $relatedPost->title }} @endif
@if($relatedPost->category) {{ $relatedPost->category->name }} @endif

{{ $relatedPost->title }}

@if($relatedPost->excerpt)

{{ \Illuminate\Support\Str::limit($relatedPost->excerpt, 140) }}

@endif
{{ $relatedPost->published_at ? $relatedPost->published_at->format('d M Y') : $relatedPost->created_at->format('d M Y') }}
@endforeach
@endif @include('partials.site-scripts')