File tree Expand file tree Collapse file tree 2 files changed +27
-2
lines changed
Expand file tree Collapse file tree 2 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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 >
You can’t perform that action at this time.
0 commit comments