@extends('layouts.admin') @section('title', 'Dashboard') @section('content')

Dashboard

Welcome back, {{ Auth::user()->name }}

Total Posts

{{ $stats['total_posts'] }}

{{ $stats['published_posts'] }} published

Subscribers

{{ $stats['total_subscribers'] }}

Active subscribers

Total Views

{{ number_format($stats['total_views']) }}

{{ $stats['views_today'] }} today

Messages

{{ $stats['unread_messages'] }}

Unread messages

Views - Last 7 Days

Top Posts

@foreach($topPosts as $post)
{{ Str::limit($post->title, 40) }} {{ number_format($post->views) }} views
@endforeach

Recent Subscribers

View All
@forelse($recentSubscribers as $subscriber)

{{ $subscriber->email }}

{{ $subscriber->subscribed_at->diffForHumans() }}

Active
@empty

No subscribers yet.

@endforelse

Recent Messages

View All
@forelse($recentMessages as $message)

{{ $message->name }}

{{ Str::limit($message->message, 50) }}

@if(!$message->is_read) @endif
@empty

No messages yet.

@endforelse
@push('scripts') @endpush @endsection