{{ single_price(Auth::user()->affiliate_user->balance) }} {{ __('Affiliate Balance') }}
@if (\App\Addon::where('unique_identifier', 'affiliate_system')->first() != null && \App\Addon::where('unique_identifier', 'affiliate_system')->first()->activated && \App\AffiliateOption::where('type', 'user_registration_first_purchase')->first()->status)
@php if(Auth::user()->referral_code == null){ Auth::user()->referral_code = substr(Auth::user()->id.str_random(10), 0, 10); Auth::user()->save(); } $referral_code = Auth::user()->referral_code; $referral_code_url = URL::to('/users/registration')."?referral_code=$referral_code"; @endphp
@endif

{{__('Affiliate payment history')}}

@if(count($affiliate_payments) > 0) @foreach ($affiliate_payments as $key => $affiliate_payment) @endforeach @else @endif
# {{ __('Date') }} {{__('Amount')}} {{__('Payment Method')}}
{{ $key+1 }} {{ date('d-m-Y', strtotime($affiliate_payment->created_at)) }} {{ single_price($affiliate_payment->amount) }} {{ ucfirst(str_replace('_', ' ', $affiliate_payment ->payment_method)) }}
{{ __('No history found.') }}
    {{ $affiliate_payments->links() }}