@php $tabs = [ ['key' => null, 'label' => 'All', 'count' => $counts['all']], ['key' => 'published', 'label' => 'Published', 'count' => $counts['published']], ['key' => 'scheduled', 'label' => 'Scheduled', 'count' => $counts['scheduled']], ['key' => 'draft', 'label' => 'Drafts', 'count' => $counts['draft']], ]; @endphp

Blog

Categories · Tags

New Article
@foreach($tabs as $tab) {{ $tab['label'] }} {{ $tab['count'] }} @endforeach
@if($status)@endif
@if($posts->isEmpty())
@if($search || $status) No articles match this filter. @else No articles yet. @endif
@else
@foreach($posts as $post) @endforeach
Title Category Status Publish Date Views Actions
{{ Str::limit($post->title, 64) }} @if($post->is_featured) @endif {{ $post->category?->name ?? '—' }} @php $badge = match ($post->status) { 'published' => 'bg-success-subtle text-success', 'scheduled' => 'bg-primary-subtle text-primary', default => 'bg-secondary-subtle text-secondary', }; @endphp {{ ucfirst($post->status) }} {{ $post->published_at?->format('j M Y, g:i a') ?? '—' }} {{ number_format($post->views_count) }} @if($post->status === 'published') View @endif Edit
{{ $posts->links() }}
@endif