Skip to content

Commit 2cbace6

Browse files
authored
[Feature] Added home nav item (alexjustesen#921)
1 parent 0a94c55 commit 2cbace6

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

app/Filament/Pages/Dashboard.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ class Dashboard extends BasePage
1616
{
1717
protected static ?string $pollingInterval = null;
1818

19+
protected static ?string $navigationIcon = 'heroicon-o-chart-bar';
20+
21+
protected static ?int $navigationSort = 1;
22+
1923
protected static string $view = 'filament.pages.dashboard';
2024

2125
protected function getHeaderActions(): array

app/Filament/Resources/ResultResource.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ class ResultResource extends Resource
2626

2727
protected static ?string $navigationIcon = 'heroicon-o-table-cells';
2828

29+
protected static ?int $navigationSort = 2;
30+
2931
public static function form(Form $form): Form
3032
{
3133
$settings = new GeneralSettings();

app/Filament/Resources/UserResource.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ class UserResource extends Resource
2121

2222
protected static ?string $navigationIcon = 'heroicon-o-users';
2323

24+
protected static ?int $navigationSort = 3;
25+
2426
public static function form(Form $form): Form
2527
{
2628
return $form

app/Providers/Filament/AdminPanelProvider.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ public function panel(Panel $panel): Panel
8080
->collapsible(false),
8181
])
8282
->navigationItems([
83+
NavigationItem::make('Home')
84+
->url('/')
85+
->icon('heroicon-o-home')
86+
->sort(0),
8387
NavigationItem::make('Documentation')
8488
->url('https://docs.speedtest-tracker.dev/', shouldOpenInNewTab: true)
8589
->icon('heroicon-o-book-open')

0 commit comments

Comments
 (0)