more details on admin overview
This commit is contained in:
parent
31bbc4f906
commit
74c7fc9da1
|
@ -37,7 +37,9 @@ class OverViewController extends Controller
|
||||||
//Get counters
|
//Get counters
|
||||||
$counters = collect();
|
$counters = collect();
|
||||||
//Set basic variables in the collection
|
//Set basic variables in the collection
|
||||||
$counters->put('users', User::query()->count());
|
$counters->put('users', collect());
|
||||||
|
$counters['users']->active = User::where("suspended", 0)->count();
|
||||||
|
$counters['users']->total = User::query()->count();
|
||||||
$counters->put('credits', number_format(User::query()->whereHas("roles", function($q){ $q->where("id", "!=", "1"); })->sum('credits'), 2, '.', ''));
|
$counters->put('credits', number_format(User::query()->whereHas("roles", function($q){ $q->where("id", "!=", "1"); })->sum('credits'), 2, '.', ''));
|
||||||
$counters->put('payments', Payment::query()->count());
|
$counters->put('payments', Payment::query()->count());
|
||||||
$counters->put('eggs', Egg::query()->count());
|
$counters->put('eggs', Egg::query()->count());
|
||||||
|
|
|
@ -58,7 +58,12 @@
|
||||||
<span class="info-box-icon bg-info elevation-1"><i class="fas fa-server"></i></span>
|
<span class="info-box-icon bg-info elevation-1"><i class="fas fa-server"></i></span>
|
||||||
|
|
||||||
<div class="info-box-content">
|
<div class="info-box-content">
|
||||||
<span class="info-box-text">{{__('Servers')}}</span>
|
<span class="info-box-text">{{__('Servers')}}
|
||||||
|
<i class="fas fa-info-circle mr-4" data-toggle="popover"
|
||||||
|
data-trigger="hover" data-placement="top"
|
||||||
|
data-html="true"
|
||||||
|
data-content="{{ __("This shows the total active servers and the total servers. Total active servers are all servers which are not suspended") }}"></i>
|
||||||
|
</span>
|
||||||
<span class="info-box-number">{{$counters['servers']->active}}/{{$counters['servers']->total}}</span>
|
<span class="info-box-number">{{$counters['servers']->active}}/{{$counters['servers']->total}}</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.info-box-content -->
|
<!-- /.info-box-content -->
|
||||||
|
@ -71,8 +76,13 @@
|
||||||
<span class="info-box-icon bg-primary elevation-1"><i class="fas fa-users"></i></span>
|
<span class="info-box-icon bg-primary elevation-1"><i class="fas fa-users"></i></span>
|
||||||
|
|
||||||
<div class="info-box-content">
|
<div class="info-box-content">
|
||||||
<span class="info-box-text">{{__('Users')}}</span>
|
<span class="info-box-text">{{__('Users')}}
|
||||||
<span class="info-box-number">{{$counters['users']}}</span>
|
<i class="fas fa-info-circle mr-4" data-toggle="popover"
|
||||||
|
data-trigger="hover" data-placement="top"
|
||||||
|
data-html="true"
|
||||||
|
data-content="{{ __("This shows the total active Users and the total Users. Total active Users are all Users which are not suspended") }}"></i>
|
||||||
|
</span>
|
||||||
|
<span class="info-box-number">{{$counters['users']->active}}/{{$counters['users']->total}}</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.info-box-content -->
|
<!-- /.info-box-content -->
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue