@extends('layouts.site') @section('content')

{{ __('blog.meta-index-title') }}

{{ __('blog.meta-index-description') }}

@forelse($posts as $index => $post) @php $title = method_exists($post, 'translate') ? $post->translate('title') : $post->title; $excerpt = method_exists($post, 'translate') ? $post->translate('excerpt') : ($post->excerpt ?? ''); $categoryName = $post->category ? $post->category->name : ''; $categorySlug = $post->category ? $post->category->slug : ''; $publishedDate = $post->published_at ? $post->published_at->format('d M Y') : $post->created_at->format('d M Y'); $imageUrl = $post->featured_image ? asset('storage/' . $post->featured_image) : asset('assets/img/photos/b1.jpg'); $blogUrl = route('blog.show', $post->slug); $commentCount = $post->comments_count ?? 0; $authorName = $post->author ? $post->author->name : ''; @endphp @if($index < 3) {{-- İlk 3 blog yazısı classic-view formatında --}} @endif @empty

{{ __('blog.empty') }}

@endforelse
@if($posts->count() > 3)
@foreach($posts as $index => $post) @if($index >= 3) @php $title = method_exists($post, 'translate') ? $post->translate('title') : $post->title; $excerpt = method_exists($post, 'translate') ? $post->translate('excerpt') : ($post->excerpt ?? ''); $categoryName = $post->category ? $post->category->name : ''; $categorySlug = $post->category ? $post->category->slug : ''; $publishedDate = $post->published_at ? $post->published_at->format('d M Y') : $post->created_at->format('d M Y'); $imageUrl = $post->featured_image ? asset('storage/' . $post->featured_image) : asset('assets/img/photos/b4.jpg'); $blogUrl = route('blog.show', $post->slug); $commentCount = $post->comments_count ?? 0; @endphp @endif @endforeach
@endif {{-- Pagination --}} @if(method_exists($posts, 'links') && $posts->hasPages())
{{ $posts->links() }}
@endif
@endsection