@php // Get featured blogs $featuredBlogs = getBlogsByMetaData(['is_featured' => 1], 10, true, ['author', 'media', 'categories', 'comments'])[ 'blogs' ]; $firstTwo = $featuredBlogs->take(2); $nextTwo = $featuredBlogs->slice(2, 2); $remaining = $featuredBlogs->slice(5); @endphp @if (count($featuredBlogs))
{{ __('frontend::translate.Featured') }} {{ __('frontend::translate.The Improbable Rise and Savage Fall of Siegfried. How My Phone’s Most Annoying Feature Saved My Life') }}
@foreach ($firstTwo as $key => $blog) @endforeach
@foreach ($nextTwo as $blog)
{{ $blog->title }}
{{ $blog->categories->first()->name ?? 'Uncategorized' }}

{{ getCountedWord($blog->title, 50) }}

@endforeach
@foreach ($remaining as $blog)
{{ $blog->title }}

{{ getCountedWord($blog->title, 50) }}

{{ $blog->created_at->format('M d, Y') }}
@endforeach
@endif