@extends('layouts.user.base') @php $system_settings = active_system_setting(); $user = auth()->user()->load(['wallet','investments', 'active_investments', 'compounding_wallet', 'bonus_wallet','settings']); $wallet = $user->wallet; $active_investments = $user->active_investments; $compounding_wallet = $user->compounding_wallet; $bonus_wallet = $user->bonus_wallet; $settings = $user->settings; // $last_calculated_plan = App\Models\Investments\CalculatorLog::where('user_id', $user->id)->orderBy('id', 'DESC')->with(['plan'])->first(); // $show_calculator_reminder = $last_calculated_plan ? 1 : 0; $popup_target = getPopupTarget($user); $show_popup_target = $popup_target ? 1 : 0; @endphp @section('welcome_message')
Welcome, {{ $user->name }}
{{ $user->group_user->group->name }}
@endsection @section('content')
Invested

{{ $settings->hide_wallet ? "*******" : formatMoney($user->investments->sum('amount')) }}

Main Balance

{{ $settings->hide_wallet ? "*******" : formatMoney($wallet->balance) }}

View
Compounding Balance

{{ $settings->hide_wallet ? "*******" : formatMoney($compounding_wallet->balance) }}

View
Referral Bonus Balance

{{ $settings->hide_wallet ? "*******" : formatMoney($bonus_wallet->balance) }}

View
Plans

{{ $user->plans->unique('id')->count() }}

Transactions

{{ $user->investments->count() }}

Token Balance ({!! formatTokn($user->tokn_wallet->balance + $user->additional_info->tokn_transactions->sum('amount')) !!})

{!! $settings->hide_wallet ? "*******" : formatMoney(($user->tokn_wallet->balance + $user->additional_info->tokn_transactions->sum('amount')) / $system_settings->tokn_multiplier) !!}

View
Total Tokens Earned

{{ $settings->hide_wallet ? "*******" : formatTokn($token_transactions->sum('amount') + $user->additional_info->tokn_transactions->sum('amount')) }}

View
Total Referrals

{{ $referrals->count() + count($additional_downlines) }}

View
{{-- --}}
Investments
Make Investments
@foreach ($investments->sortByDesc('start_at') as $investment) @endforeach
Plan Amount Profit Start Next Payout End Status
{{ $investment->plan->name }}

{{ formatMoney($investment->amount) }}

{{ $investment->isActive() ? formatMoney($investment->profit()) : NOT_AVAILABLE }}

{{ $investment->start_date($investment->payouts) }}

{{ $investment->next_payout_date($investment->payouts) }}

{{ $investment->end_date($investment->payouts) }}

{{ $investment->status_data()->message }}
{{--
Activity
--}}
Share Referral Link

Referrals


@foreach ($referrals->sortByDesc('created_at') as $referral) @endforeach @php $_limit = 0; @endphp @foreach ($additional_downlines as $downline) @if($_limit < 10)
{{ $downline['referree']->name }}

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

@endif @php $_limit++; @endphp @endforeach
@if($popup_target) @endif {{-- @if($last_calculated_plan) @endif --}} {{-- if("{{ $show_calculator_reminder }}" == 1){ $('#calculated_investment_reminder').modal('show'); } --}} @endsection @section('scripts') @endsection