@extends('layouts.admin') @section('title', __('blog.blog_analytics')) @section('content')

{{ __('blog.blog_analytics') }}

{{ __('blog.performance_metrics_and_insights') }}

{{ __('blog.total_posts') }}
{{ number_format($stats['total_posts']) }}
{{ __('blog.published_colon') }} {{ number_format($stats['published_posts']) }}
{{ __('blog.total_views') }}
{{ number_format($stats['total_views']) }}
{{ __('blog.period_colon') }} {{ number_format($periodStats['views_gained']) }}
{{ __('blog.comments') }}
{{ number_format($stats['total_comments']) }}
{{ __('blog.period_colon') }} {{ number_format($periodStats['comments_received']) }}
{{ __('blog.categories') }}
{{ number_format($stats['total_categories']) }}
{{ __('blog.active_colon') }} {{ number_format($stats['active_categories']) }}
{{ __('blog.period_overview') }}

{{ number_format($periodStats['posts_created']) }}

{{ __('blog.posts_created') }}

{{ number_format($periodStats['posts_published']) }}

{{ __('blog.posts_published') }}

{{ number_format($periodStats['views_gained']) }}

{{ __('blog.views_gained') }}

{{ number_format($periodStats['comments_received']) }}

{{ __('blog.comments_received') }}

{{ __('blog.posts_created_over_time') }}
{{ __('blog.views_over_time') }}
{{ __('blog.top_viewed_posts') }}
{{ __('blog.view_all') }}
@if($topPosts->count() > 0)
@foreach($topPosts as $index => $post) @endforeach
{{ $index + 1 }}
{{ $post->title }}
{{ $post->category->name ?? __('blog.uncategorized') }} • {{ $post->author->name ?? __('blog.unknown') }}
{{ number_format($post->views_count) }} {{ __('blog.views') }}
@else

{{ __('blog.no_data_available_yet') }}

@endif
{{ __('blog.most_commented_posts') }}
{{ __('blog.view_all') }}
@if($mostCommentedPosts->count() > 0)
@foreach($mostCommentedPosts as $index => $post) @endforeach
{{ $index + 1 }}
{{ $post->title }}
{{ $post->category->name ?? __('blog.uncategorized') }} • {{ $post->author->name ?? __('blog.unknown') }}
{{ $post->comments_count }} {{ __('blog.comments') }}
@else

{{ __('blog.no_comments_yet') }}

@endif
{{ __('blog.category_performance') }}
{{ __('blog.manage_categories') }}
@if($categoryStats->count() > 0)
@foreach($categoryStats as $category) @endforeach
{{ __('blog.category') }} {{ __('blog.posts') }} {{ __('blog.total_views') }} {{ __('blog.avg_views_per_post') }}
{{ $category['name'] }} {{ number_format($category['posts_count']) }} {{ number_format($category['total_views']) }} {{ $category['posts_count'] > 0 ? number_format($category['total_views'] / $category['posts_count'], 1) : 0 }}
@else

{{ __('blog.no_categories_found') }}

@endif
{{ __('blog.recent_activity') }}
@if($recentActivity->count() > 0)
@foreach($recentActivity as $activity)
{{ $activity['title'] }}

{{ __('blog.by') }} {{ $activity['user'] }} • {{ $activity['date']->diffForHumans() }}

@endforeach
@else

{{ __('blog.no_recent_activity') }}

@endif
{{ __('blog.export_data') }}
{{ __('blog.posts_analytics') }}
{{ __('blog.export_csv') }}
{{ __('blog.comments_analytics') }}
{{ __('blog.export_csv') }}
{{ __('blog.categories_analytics') }}
{{ __('blog.export_csv') }}
@endsection @push('styles') @endpush @push('scripts') @endpush