@extends('layouts.portal') @section('title', 'Agent Referrals') @section('page_title', 'My Referrals') @section('page_subtitle', 'Manage your referred clients') @section('sidebar') @include('agent.partials.sidebar', ['active' => 'clients']) @endsection @section('content')
View and manage clients you have referred
Total Referrals
{{ $stats['total_referrals'] }}
This Month
{{ $stats['this_month'] }}
Total Commission
${{ number_format($stats['total_commission'], 2) }}
Resume a client you started but haven't completed
{{ $draft->first_name ?: 'Unnamed client' }}
IC: {{ $draft->ic_number ?: '—' }} · Started {{ $draft->created_at?->diffForHumans() }}
| Client | Contact | Package | Status | Date | Commission | Actions |
|---|---|---|---|---|---|---|
|
{{ substr($client->first_name, 0, 1) }}
{{ $client->full_name }} ID: #{{ $client->id }} |
{{ $client->email }} {{ $client->phone }} |
{{ ucfirst($client->account_type) }} | {{ ucfirst($client->status) }} |
{{ $client->created_at->format('M d, Y') }} |
@php
// Calculate commission earned from this client
$commission = \App\Models\Commission::where('client_id', $client->id)->sum('amount');
@endphp
${{ number_format($commission, 2) }} earned |
|
|
No referrals yet Start referring clients to see them here Refer Your First Client |
||||||
Showing {{ $clients->firstItem() }} to {{ $clients->lastItem() }} of {{ $clients->total() }} results
{{ $clients->links() }}