Skip to content

Commit 4c3d2a4

Browse files
committed
Stats fix
1 parent d27217c commit 4c3d2a4

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
namespace App\Migrations;
4+
5+
use App\Web\Analytics\VisitsPerDay\VisitsPerDay;
6+
use App\Web\Analytics\VisitsPerHour\VisitsPerHour;
7+
use Tempest\Console\ConsoleCommand;
8+
use Tempest\Console\HasConsole;
9+
10+
final class FixDateTimeFieldsMigration
11+
{
12+
use HasConsole;
13+
14+
#[ConsoleCommand(name: 'fix:projections')]
15+
public function __invoke()
16+
{
17+
foreach (VisitsPerDay::all() as $visitsPerDay) {
18+
$visitsPerDay->save();
19+
}
20+
21+
foreach (VisitsPerHour::all() as $visitsPerDay) {
22+
$visitsPerDay->save();
23+
}
24+
25+
$this->success('Done');
26+
}
27+
}

src/Web/Analytics/stats.view.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
<div class="w-full mx-auto grid md:grid-cols-2 xl:grid-cols-3 gap-12 md:px-24 px-8">
1717
<x-chart :chart="$visitsPerHour" label="Visits per hour" title="Website visits last 24 hours"></x-chart>
1818
<x-chart :chart="$visitsPerDay" label="Visits per day" title="Website visits last 30 days"></x-chart>
19-
<div></div>
20-
<x-chart :chart="$packageDownloadsPerDay" label="Downloads per day" title="Package downloads last 30 days"></x-chart>
2119
</div>
2220
</div>
2321
</div>

0 commit comments

Comments
 (0)