@extends('front.layout.layout') @section('title', 'Referral Program') @section('content')

Referral Program

Referral Code: {{ $user->referral_code }}
Referral Overview

Total Referral Amount: {{ $totalReferralAmount }}

Non Withdrawable Amount: {{ $nonwithdrawable }} This amount can only be used to upgrade business

Withdrawable Referral Amount: {{ $remainingReferralAmount }}

@if ($remainingReferralAmount >= 10*$referal_code_own) @if ($user->withDrawRequest->where('status', 'pending')->isEmpty()) Request for Withdraw @endif @endif
@if ($referralHistory->isNotEmpty())
Referral History
@foreach ($referralHistory as $referral) @endforeach
Referred User Referral Amount Referral Date Withdrawal Status
{{ $referral['referred_user'] }} {{ $referral['referral_amount'] }} {{ $referral['referral_date'] }} {{ $referral['withdrawal_status'] }}
@endif
Transactions
@foreach ($transactions as $transaction) @endforeach
Amount Description Date
{{ $transaction->amount }} @if (empty($transaction->business_id)) {{ $transaction->description }} @else {!! 'Business upgrade transaction' !!} @endif {{ $transaction->created_at->format('M d, Y') }}
Withdrawal Requests
@foreach ($withdrawRequests as $request) @endforeach
Amount Bank Details Message Status Date
{{ $request->amount }} {{ $request->bank_details }} {{ $request->message }} {{ $request->status }} {{ $request->created_at->format('M d, Y') }}
@endsection @push('bottom-scripts') @endpush