@extends('appshell::layouts.private') @section('title') Affiliate: {{ $affiliate->code }} @stop @section('content') @if(session('success'))
{{ optional($affiliate->user)->email ?? '(no user)' }}
Commission: {{ ucfirst($affiliate->commission_type) }} @if($affiliate->commission_type === 'percent') {{ $affiliate->commission_value }}% @else ${{ number_format($affiliate->commission_value, 2) }} flat @endif
Member since: {{ $affiliate->created_at->format('d M Y') }}
{{ $affiliate->payout_instructions }}
@endif
| Recruit | Status | Joined | Order | Tier | Amount | Commission | Actions | |
|---|---|---|---|---|---|---|---|---|
| @if($convUser) {{ $convUser->name ?? $convUser->email }} @else — @endif | {{ $convEmail ?? '—' }} | {{ ucfirst($conversion->status) }} | {{ $conversion->created_at->format('d M Y') }} | @if($conversion->order) {{ $conversion->order->number }} @else — @endif | Tier {{ $conversion->tier ?? 1 }} | ${{ number_format($conversion->amount, 2) }} | ${{ number_format($conversion->commission, 2) }} | @if($conversion->status === 'pending') @else — @endif |
|
📊 Conversions tab — no conversions recorded for this affiliate yet.
|
||||||||
| Total Commission: | ${{ number_format($affiliate->conversions->sum('commission'), 2) }} | |||||||
| # | IP | Landing URL | Referrer | Converted | Date |
|---|---|---|---|---|---|
| {{ $click->id }} | {{ $click->ip }} | {{ $click->landing_url }} | {{ $click->referrer ?? '—' }} | @if($click->converted_at) Yes @else No @endif | {{ $click->created_at->format('d M Y H:i') }} |
|
🖱️ Clicks tab — no click tracking data for this affiliate yet.
|
|||||
| # | Amount | Status | Reference | Paid At | Actions |
|---|---|---|---|---|---|
| {{ $payout->id }} | ${{ number_format($payout->amount, 2) }} | {{ ucfirst($payout->status) }} | {{ $payout->reference ?? '—' }} | {{ optional($payout->paid_at)->format('d M Y') ?? '—' }} | Details CSV |
|
💸 Payouts tab — no payouts have been created for this affiliate yet.
|
|||||
| Recruit | Status | Joined | Tier 1 Conversions | Tier 1 Commission | Tier 2 Conversions | Tier 2 Commission Earned | ||
|---|---|---|---|---|---|---|---|---|
| {{ $recruit->code }} | {{ optional($recruit->user)->email ?? '—' }} | {{ ucfirst($recruit->status) }} | {{ $recruit->created_at->format('d M Y') }} | {{ $t1Convs->count() }} | ${{ number_format($t1Convs->sum('commission'), 2) }} | {{ $t2Convs->count() }} | @if($t2Convs->count()) ${{ number_format($t2Convs->sum('commission'), 2) }} @else — @endif | View → |
|
👥 Recruits tab — this affiliate has not referred any sub-affiliates yet.
|
||||||||
| Totals: | {{ $affiliate->recruits->sum(fn($r) => $r->conversions->where('tier',1)->count()) }} | ${{ number_format($affiliate->recruits->sum(fn($r) => $r->conversions->where('tier',1)->sum('commission')), 2) }} | {{ $affiliate->recruits->sum(fn($r) => $r->conversions->where('tier',2)->count()) }} | ${{ number_format($affiliate->recruits->sum(fn($r) => $r->conversions->where('tier',2)->sum('commission')), 2) }} | ||||