@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 --}}
@if(($referrals ?? collect())->count() > 0)
| Name |
Status |
Date Joined |
Earnings |
@foreach($referrals as $referral)
| {{ $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) }} |
@endforeach
@else
No referrals yet. Share your code to start earning!
@endif
@endsection
@push('scripts')
@endpush