@extends('admin.layouts.master') @section('admin_content')
@php $users= App\Models\User::count(); @endphp TOTAL USERS

{{$users}}

@php $active_users= App\Models\Purchase::distinct()->count('user_id'); //dd($active_users); @endphp TOTAL ACTIVE USERS

{{$active_users}}

@php $users= App\Models\User::count(); $active_users= App\Models\Purchase::distinct()->count('user_id'); $inactive_users= $users-$active_users; @endphp TOTAL INACTIVE USERS

{{$inactive_users}}

@php $ambassadors= App\Models\User::where('ambassador',1)->count(); //dd($users); @endphp TOTAL AMBASSADORS

{{$ambassadors}}

@php $credit= App\Models\TokenWallet::where('type','credit')->sum('amount'); $debit=App\Models\TokenWallet::where('type','debit')->sum('amount'); $token_wallet=round($credit-$debit,2); @endphp TOTAL TOKEN WALLET

{{$token_wallet}}

@php $credit_b= App\Models\BonusWallet::where('type','credit')->where('status','approved')->sum('amount'); $debit_b=App\Models\BonusWallet::where('type','debit')->where('status','approved')->sum('amount'); $bonus_wallet=round($credit_b-$debit_b,2); @endphp TOTAL BONUS WALLET

{{$bonus_wallet}}

@php $staking_wallet= App\Models\StakingWallet::sum('amount'); @endphp TOTAL STAKING WALLET

{{$staking_wallet}}

@endsection