@extends('dashboard.app') @section('title', 'Dashboard') @section('page_title', 'Dashboard Overview') @section('page_subtitle', 'A shared layout with role-based navigation.') @section('dashboard_content') @php $isAdmin = Gate::allows('admin'); $metrics = $overviewMetrics ?? [ 'users_total' => 0, 'users_personal' => 0, 'subscriptions_active' => 0, 'subscriptions_total' => 0, 'webhook_total' => 0, 'webhook_errors' => 0, ]; $personalPct = $metrics['users_total'] > 0 ? round(($metrics['users_personal'] / $metrics['users_total']) * 100) : 0; @endphp
Total users
{{ number_format($metrics['users_total']) }}
{{ number_format($metrics['users_personal']) }} personal users
Active subscriptions
{{ number_format($metrics['subscriptions_active']) }}
{{ number_format($metrics['subscriptions_total']) }} total subscriptions
{{ $metrics['subscriptions_active'] > 0 ? 'Live access enabled' : 'No active subs' }}
Webhook events
{{ number_format($metrics['webhook_total']) }}
{{ number_format($metrics['webhook_errors']) }} failures
{{ $metrics['webhook_errors'] > 0 ? 'Needs review' : 'All clear' }}
Insights
Usage highlights
Last 7 days
Top search
"smile"
14% of queries
Most used category
Smileys
8,214 views
New users
Last 7 days
Subscriptions
Created last 7 days
Webhooks
Events last 7 days
@endsection @push('scripts') @endpush