{{-- ============================================================ resources/views/admin/promotions/index.blade.php ============================================================ --}} @extends('layouts.admin') @section('title','User Promotions') @section('content') {{-- Stats --}}
@php $pendingPromos = \App\Models\UserPromotion::where('status','pending')->count(); $activePromos = \App\Models\UserPromotion::where('status','active')->count(); $totalPtsBudget = \App\Models\UserPromotion::sum('points_budget'); $totalPtsSpent = \App\Models\UserPromotion::sum('points_spent'); @endphp
{{ $activePromos }}
Active Promotions
{{ $pendingPromos }}
Pending Review
{{ number_format($totalPtsBudget) }}
Total Budget (pts)
{{ number_format($totalPtsSpent) }}
Points Paid to Viewers
{{-- Filters --}}
Reset

All Promotions {{ $promotions->total() }}

@forelse($promotions as $promo) @php $info = $promo->platform_info; @endphp @empty @endforelse
CampaignUserPlatformBudgetViewsStatusDateActions
{{ Str::limit($promo->title,40) }}
{{ Str::limit($promo->url,40) }}
{{ $promo->user->name }}
{{ $info['icon'] }} {{ $info['label'] }}
{{ number_format($promo->points_budget) }} pts
{{ number_format($promo->points_remaining) }} left
{{ number_format($promo->views_count) }}
{{ $promo->ctr }}% CTR
{{ ucfirst($promo->status) }} {{ $promo->created_at->format('d M Y') }}
@if($promo->status === 'pending')
@csrf
@endif
No promotions found.
{{-- Reject Modal --}} @endsection @push('scripts') @endpush