@extends('layouts.app') @section('title', 'Analytics') @section('page-title', 'Analytics Dashboard') @section('page-subtitle', 'Insights and statistics') @section('content')

Expired

{{ $expiredCount }}

Expiring in 7 Days

{{ $expiringIn7Days }}

Expiring in 30 Days

{{ $expiringIn30Days }}

License Creation Trend (12 Months)

@foreach($monthlyTrend as $data)
{{ $data['count'] }} licenses
{{ $data['month'] }}
@endforeach

Revenue by Plan Type

@foreach($revenueByPlan as $plan => $revenue)
{{ $plan }} ${{ number_format($revenue) }}
@endforeach
Total Revenue ${{ number_format(array_sum($revenueByPlan)) }}

Plan Distribution

@foreach($planDistribution as $plan)
{{ ucfirst($plan->plan_type) }}
{{ $plan->count }}
@endforeach

Top 10 Customers

@foreach($topCustomers as $customer)
{{ strtoupper(substr($customer->customer_name, 0, 1)) }}{{ strtoupper(substr(explode(' ', $customer->customer_name)[1] ?? 'X', 0, 1)) }}

{{ $customer->customer_name }}

{{ $customer->customer_email }}

{{ $customer->license_count }} licenses

{{ $customer->active_count }} active

@endforeach
@endsection