@extends('layouts.user') @section('page-title', __('Referrals')) @section('content')

{{ __('Total Earnings') }}

{{ currency($totalEarnings) }}

{{ __('Active Referrals') }}

{{ number_format($referralCount) }}

{{ __('Your Commission') }}

{{ auth()->user()->referral_commission }}%

{{ __('Your Referral Link') }}

{{ __('Earn commission on every order placed by your referrals.') }}

{{ __('Your Referrals') }}

@forelse($referrals as $referral)
{{ substr($referral->name, 0, 1) }}

{{ $referral->name }}

{{ $referral->created_at->format('M d, Y') }}

{{ $referral->orders_count }} orders
@empty

{{ __('No referrals yet') }}

@endforelse

{{ __('Earnings History') }}

@forelse($earnings as $earning)

{{ $earning->referredUser?->name ?? 'Unknown' }}

{{ $earning->created_at->format('M d, Y H:i') }}

+{{ currency($earning->amount) }}
@empty

{{ __('No earnings yet') }}

@endforelse
@endsection