@if($post->featured_image || $post->featured_image_url)
-
+
{{ __('blog.read_more') }}
@endif
-
+
+
-
-
- @endif
- @empty
-
-
{{ __('blog.empty') }}
-
- @endforelse
+
+ @empty
+
+
{{ __('blog.empty') }}
+
+ @endforelse
+
-{{-- Subsequent posts in Grid View --}}
-@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/tb10.jpg');
- $blogUrl = route('blog.show', $post->slug);
- $authorName = $post->author ? $post->author->name : 'Trunçgil';
- @endphp
-
-
-
- @if($post->featured_image || $post->featured_image_url)
-
-
-
-
-
- {{ __('blog.read_more') }}
-
-
- @endif
-
-
-
-
{{ \Illuminate\Support\Str::limit(strip_tags($excerpt), 120) }}
-
-
-
-
-
+{{-- Dynamic Custom Pagination --}}
+@if(method_exists($posts, 'links') && $posts->hasPages())
+
-
-@endif
-{{-- Pagination --}}
-@if(method_exists($posts, 'links') && $posts->hasPages())
-
+ {{-- Next Page Link --}}
+ @if ($posts->hasMorePages())
+
+
+
+
+
+ @else
+
+
+
+
+
+ @endif
+
+
@endif