Skip to content

Commit 8f39ec3

Browse files
authored
added date to latest result stats (alexjustesen#225)
1 parent 2288336 commit 8f39ec3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/Filament/Widgets/StatsOverview.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace App\Filament\Widgets;
44

55
use App\Models\Result;
6+
use App\Settings\GeneralSettings;
67
use Filament\Widgets\StatsOverviewWidget as BaseWidget;
78
use Filament\Widgets\StatsOverviewWidget\Card;
89

@@ -12,8 +13,11 @@ protected function getCards(): array
1213
{
1314
$result = Result::latest()->first();
1415

16+
$settings = new GeneralSettings();
17+
1518
return [
1619
Card::make('Latest download', fn (): string => ! blank($result) ? formatBits(formatBytesToBits($result->download)).'ps' : 'n/a')
20+
->description('Tested at: '.optional($result)->created_at->timezone($settings->timezone)->format($settings->time_format))
1721
->icon('heroicon-o-download'),
1822
Card::make('Latest upload', fn (): string => ! blank($result) ? formatBits(formatBytesToBits($result->upload)).'ps' : 'n/a')
1923
->icon('heroicon-o-upload'),

0 commit comments

Comments
 (0)