Skip to content

Commit 70d5a80

Browse files
authored
Automatically refresh dashboard (#124)
1 parent 423cea8 commit 70d5a80

File tree

3 files changed

+44
-41
lines changed

3 files changed

+44
-41
lines changed

app/Filament/Resources/ResultResource/Pages/ListResults.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ protected function getTableQuery(): Builder
1515
return parent::getTableQuery()->orderBy('id', 'desc');
1616
}
1717

18+
protected function getTablePollingInterval(): ?string
19+
{
20+
return '5s';
21+
}
22+
1823
protected function getHeaderWidgets(): array
1924
{
2025
return ResultResource::getWidgets();

app/Filament/Widgets/StatsOverview.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
class StatsOverview extends BaseWidget
1010
{
11-
protected static ?string $pollingInterval = null;
12-
1311
protected function getCards(): array
1412
{
1513
$result = Result::latest()->first();

composer.lock

Lines changed: 39 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)