@extends('public.layout.app') {{-- change to your front layout if different --}} @section('title', __('front.posts')) @section('body')
{{-- Hero + Search --}}
{{ __('front.blog_news') }}

{{ __('front.posts') }}

{{ __('front.read_latest_updates_articles_and_announcements') }}

{{ __('front.total') }} {{ $posts->total() }}
@if(request()->filled('q')) @endif
{{-- Posts Grid --}}
@forelse($posts as $post) @php $img = $post->cover_image ?? $post->thumbnail ?? $post->image ?? null; // change field names as needed $excerpt = $post->excerpt ?? \Illuminate\Support\Str::limit(strip_tags($post->body ?? ''), 130); @endphp
{{-- Image --}}
@if($img) {{ $post->title }} @else
{{ __('front.no_cover') }}
{{ __('front.post_image_placeholder') }}
@endif
{{ optional($post->created_at)->format('Y-m-d') }} {{ $post->slug }}
{{ $post->title }}

{{ $excerpt }}

@empty
{{ __('front.no_results') }}
{{ __('front.no_posts_found') }}

{{ __('front.try_a_different_keyword') }}

@endforelse
{{-- Pagination --}} @if($posts->hasPages())
{{ $posts->links('pagination::bootstrap-4') }}
@endif
@endsection