@php // Sirf wahi columns select karein jo card me chahiye (Fast Loading) $sliderBlogs = \App\Models\Blog::select('id', 'title', 'slug', 'image', 'created_at', 'description') ->latest() ->take(6) ->get(); @endphp @if($sliderBlogs->count() > 0) {{-- Swiper.js CSS CDN --}}
{{-- Section Header --}}
Latest Insights

From Our Blog

{{-- Swiper Slider --}}
@foreach($sliderBlogs as $blog)
{{-- Blog Image with Lazy Loading --}}
@if($blog->image) {{ $blog->title }} @else {{ $blog->title }} @endif {{ $blog->created_at ? \Carbon\Carbon::parse($blog->created_at)->format('d M Y') : '' }}
{{-- Card Body --}}
{{ $blog->title }}

{{ Str::limit(strip_tags($blog->description), 95) }}

Read Article
@endforeach
{{-- Slider CSS --}} {{-- Swiper.js Script --}} @endif