{{-- 📢 إعلان جانبي --}}
@include('front.partials.ads.dynamic', ['position' => 'sidebar_top'])
{{-- 🔥 الأكثر قراءة --}} {{-- 🔥 الأكثر قراءة --}} @php use App\Models\Post; $trending = Post::published() ->withCount([ 'visits as total_visits' => function ($q) { $q->where('visitable_type', Post::class); } ]) ->orderByDesc('total_visits') ->limit(5) ->get(); @endphp @if($trending->count())

الأكثر قراءة

@foreach($trending as $post)
@if($post->cover) @endif
{{ $post->title }}
👁️ {{ $post->total_visits }} مشاهدة
@endforeach
@endif {{-- 🏷️ الوسوم --}} @php $tags = \App\Models\Tag::latest()->take(20)->get(); @endphp @if($tags->count())

الوسوم

@foreach($tags as $tag) #{{ $tag->name }} @endforeach
@endif {{-- ✍️ كتّابنا --}} @php $authors = \App\Models\User::whereHas('posts', fn($q) => $q->published()) ->withCount(['posts' => fn($q) => $q->published()]) ->latest() ->take(5) ->get(); @endphp @if($authors->count())

كتّابنا

@foreach($authors as $author)
{{ $author->name }}
{{ $author->name }}
{{ $author->posts_count }} مقال
@endforeach
عرض جميع الكتّاب →
@endif