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

Admin Dashboard 📊

Full control of your API business at a glance.

New API New Key
@if($pending > 0)
{{ $pending }} order(s) waiting for approval. Review now →
@endif
+{{ $admins }} admins

{{ number_format($users) }}

Total Users

{{ $rate }}% ok

{{ number_format($today) }}

Requests Today ({{ fmt_num($total) }} total)

{{ taka($revenueToday) }} today

{{ taka($revenue) }}

Total Revenue

{{ $keys }} keys

{{ $services }}

Active APIs ({{ $latency }}ms avg)

Requests — Last 14 Days
@foreach($chart as $c)
{{ $c['label'] }}: {{ $c['total'] }} hits
{{ \Carbon\Carbon::parse($c['label'])->format('d') }}
@endforeach
Recent API Calls
@forelse($recentLogs as $l) @empty @endforelse
UserAPIStatusTime
{{ $l->user->name ?? 'Guest' }} {{ $l->service->name ?? '—' }} {!! badge($l->status) !!} {{ $l->created_at->diffForHumans() }}
No requests yet.
View All Logs
Recent Orders
@forelse($recentOrders as $o) @empty @endforelse
UserPackageAmountStatus
{{ $o->user->name }} {{ $o->order_kind === 'wallet_topup' ? 'Wallet top-up' : ($o->package?->name ?? 'Custom credits') }} {{ $o->amount > 0 ? taka($o->amount) : 'FREE' }} {!! badge($o->status) !!}
No orders yet.
Manage Orders
Top APIs (30 days)
@forelse($topSvc as $s)
{{ $s->name }}{{ number_format($s->logs_count) }} hits
@empty
No data yet
@endforelse
Top Keys by Usage
@forelse($topKeys as $t)
{{ $t->service->name ?? $t->label }}
{{ $t->user->name ?? '' }}
{{ number_format($t->used_request) }} used
@empty
No data yet
@endforelse
@endsection