@extends('layouts.user.base') @php $_icon = ''; $user = auth()->user()->load(['group_user.group', 'tokn_wallet']); $total_tokens = $groups->sum('access_tokn'); $total_division_value = $user->group_user->group->access_tokn; $group_level_percentage = $total_division_value < 1 ? 100 : percentage($user->tokn_wallet->balance, $total_division_value); @endphp @section('page-title') Referrals @endsection @section('content')
Total Referrals

{{ count($downlines) }}

Referral/Bonus Balance

{{ formatMoney($user->bonus_wallet->balance) }}

{{--
Referral Withdrawals

{{ formatMoney($user->bonus_wallet->withdrawals->sum('amount')) }}

--}}
Total Referral Earning

{{ formatMoney($user->bonus_wallet->transactions->where('type', \App\Models\Wallet\WalletTransaction::CREDIT)->where('status', \App\Models\Wallet\WalletTransaction::status_approved)->sum('amount') + $user->additional_info->total_earnings) }}

Team Volume

{{ formatMoney($team_volume) }}

@php $settings = \App\Models\BlackFridaySetting::getSettings(); @endphp @if($settings->isActive())
Black Friday Team Volume

{{ formatMoney($blackfriday_team_volume['total'] ?? 0) }}

{{--
Level 1: {{ formatMoney($blackfriday_team_volume['level_1'] ?? 0) }} Level 2: {{ formatMoney($blackfriday_team_volume['level_2'] ?? 0) }}
--}}
@endif


@foreach ($groups as $group)
@if($group->id == $user->group_user->group_id) {!!$_icon!!} @endif {{ $group->name }}
@endforeach

{{-- --}} @foreach ($downlines as $downline) {{-- --}} @endforeach
Name BonusJoinedLevel Plan Status
{{ $downline['referree']->settings->incognito_mode ? "******" : $downline['referree']->name }}

{{ formatMoney($downline['bonus']) }}

{{ timeAgo($downline['referree']->created_at) }}

{{ $downline['level'] }}

@php $investments = $downline['referree']->active_investments; $plan_bame = $investments->count() > 0 ? $investments->sortByDesc('id')->first()->plan->name : NOT_AVAILABLE; @endphp

{{ $plan_bame }}

{{ $downline['referree']->status_data()->message }}
Referral Structures

The accumulation of PRP tokens will serve as the means of accessing the various referral levels available on the system.

Learn More
@endsection @section('scripts') @endsection