@if ($firstCategory || $categories->isNotEmpty())
@if ($title = $shortcode->title)

{!! BaseHelper::clean($title) !!}

@endif @if ($firstCategory) {{ __('View All Posts') }} @endif
@foreach($categories as $category) @php $posts = $category->posts()->take(3)->with('slugable')->latest()->get(); @endphp @continue($posts->isEmpty())

{{ $category->name }}


@php $posts = get_posts_by_category($category->getKey(), $postsPerCategory); @endphp @foreach($posts as $post)
{{ RvMedia::image($post->image, $post->name, 'thumb', attributes: ['class' => 'img-hover']) }} {!! Theme::partial('blog.post.partials.action-post', compact('post')) !!}
{{ $post->name }} {!! Theme::partial('post-meta', ['post' => $post, 'wrapperClass' => 'echo-de-category-read']) !!}
@endforeach
@endforeach
@endif