@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 View All Blogs {{-- Swiper Slider --}} @foreach($sliderBlogs as $blog) {{-- Blog Image with Lazy Loading --}} @if($blog->image) @else @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
{{ Str::limit(strip_tags($blog->description), 95) }}