@extends('layouts.app') @section('title', 'Referrals') @push('styles') @endpush @section('content')

Referrals

{{-- Referral Code Card --}}
Your Referral Code
{{ $referralCode }}
{{-- Stats --}}
{{ $totalReferrals }}
Total Referrals
{{ $successfulCount }}
Successful Referrals
{{ number_format($referralEarnings) }}
Total Earnings (NGN)
{{-- Earnings Card --}}

Total Referral Earnings

NGN {{ number_format($referralEarnings, 2) }}
Go to Wallet
{{-- Referrals Table --}}
Your Referrals
@if(($referrals ?? collect())->count() > 0) @foreach($referrals as $referral) @endforeach
Name Status Date Joined Earnings
{{ $referral->name ?? $referral->email }} @php $statusClass = match($referral->status) { 'active' => 'badge-success', 'pending' => 'badge-warning', 'expired' => 'badge-danger', default => 'badge-warning' }; @endphp {{ ucfirst($referral->status) }} {{ $referral->created_at?->format('M d, Y') }} NGN {{ number_format($referral->earnings ?? 0, 2) }}
@else
No referrals yet. Share your code to start earning!
@endif
@endsection @push('scripts') @endpush