Articles de blog
@php $articleStats = [ 'total' => \App\Models\Article::count(), 'published' => \App\Models\Article::where('status', 'published')->count(), 'draft' => \App\Models\Article::where('status', 'draft')->count(), 'archived' => \App\Models\Article::where('status', 'archived')->count(), 'topViews' => \App\Models\Article::orderByDesc('views')->take(3)->get(), ]; @endphp
Total : {{ $articleStats['total'] }}
Publiés : {{ $articleStats['published'] }}
Brouillons : {{ $articleStats['draft'] }}
Archivés : {{ $articleStats['archived'] }}
Top 3 articles les plus lus
    @foreach($articleStats['topViews'] as $article)
  1. {{ $article->title }} ({{ $article->views }} vues)
  2. @endforeach
@livewire('article-publication-chart')