Angepasst
Anmeldungen zur Nikolausaktion: Auswertung nach Haushalten
This commit is contained in:
parent
369e9fb0af
commit
be26dba3e1
@ -300,6 +300,7 @@ class DashboardController extends ExtendedController
|
||||
$statistics = array();
|
||||
$totals = (object)[];
|
||||
$totals->totalOverall = 0;
|
||||
$totals->totalAddresses = 0;
|
||||
$totals->totalLastHour = 0;
|
||||
$totals->totalToday = 0;
|
||||
$totals->totalToday = 0;
|
||||
@ -312,6 +313,9 @@ class DashboardController extends ExtendedController
|
||||
$obj->subscriptions = SubscribeChild::where('city', $city->city)->count();
|
||||
$totals->totalOverall += $obj->subscriptions;
|
||||
|
||||
$obj->addresses = SubscribeChild::where('city', $city->city)->groupBy('lastnameParent')->get()->count();
|
||||
$totals->totalAddresses += $obj->addresses;
|
||||
|
||||
$obj->lastHour = SubscribeChild::where('city', $city->city)
|
||||
->where('created_at', '>', Carbon::now()->subHours(1)->toDateTimeString())
|
||||
->count();
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
<tr>
|
||||
<th scope="col">Ort</th>
|
||||
<th scope="col">Gesamt</th>
|
||||
<th scope="col">Haushalte</th>
|
||||
<th scope="col">Letzte Stunde</th>
|
||||
<th scope="col">Heute</th>
|
||||
<th scope="col">Letzte 7 Tage</th>
|
||||
@ -21,6 +22,7 @@
|
||||
<tr scope="row">
|
||||
<td scope="col">{{ $s->city }}</td>
|
||||
<td scope="col">{{ $s->subscriptions }}</td>
|
||||
<td scope="col">{{ $s->addresses }}</td>
|
||||
<td scope="col">{{ $s->lastHour }}</td>
|
||||
<td scope="col">{{ $s->today }}</td>
|
||||
<td scope="col">{{ $s->sevenDays }}</td>
|
||||
@ -36,6 +38,7 @@
|
||||
<tr>
|
||||
<th scope="col">Gesamt</th>
|
||||
<th scope="col">{{ $totals->totalOverall }}</th>
|
||||
<th scope="col">{{ $totals->totalAddresses }}</th>
|
||||
<th scope="col">{{ $totals->totalLastHour }}</th>
|
||||
<th scope="col">{{ $totals->totalToday }}</th>
|
||||
<th scope="col">{{ $totals->totalSevenDays }}</th>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user