@extends('layouts.admin') @section('style') @endSection @section('content')

{{ $stats['today'] }}

Uses Today

{{ $stats['this_week'] }}

Uses This Week

{{ $stats['success'] }}

Successful

{{ $stats['failed'] }}

Failed

Clear
@component('admin.components.tabs') @foreach($usage_logs as $log) @endforeach
No. ID Promo Code User User Email Status Used At Actions
{{ $log->id }} {{ $log->promoCode->code ?? 'N/A' }} @if($log->promoCode)
{{ Str::limit($log->promoCode->description, 30) }} @endif
{{ $log->user->name ?? 'User #' . $log->user_id }} {{ $log->user->email ?? 'N/A' }} @if($log->status === 'success') Success @elseif($log->status === 'failed') Failed @if($log->error_message)
{{ Str::limit($log->error_message, 30) }} @endif @else {{ ucfirst($log->status ?? 'Unknown') }} @endif
{{ $log->used_at->format('d/m/Y H:i:s') }} View
@endcomponent @endsection @section('script') @endSection