Skip to content

Commit

Permalink
[Feature] Added home nav item (#921)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjustesen committed Nov 22, 2023
1 parent 0a94c55 commit 2cbace6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/Filament/Pages/Dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ class Dashboard extends BasePage
{
protected static ?string $pollingInterval = null;

protected static ?string $navigationIcon = 'heroicon-o-chart-bar';

protected static ?int $navigationSort = 1;

protected static string $view = 'filament.pages.dashboard';

protected function getHeaderActions(): array
Expand Down
2 changes: 2 additions & 0 deletions app/Filament/Resources/ResultResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class ResultResource extends Resource

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

protected static ?int $navigationSort = 2;

public static function form(Form $form): Form
{
$settings = new GeneralSettings();
Expand Down
2 changes: 2 additions & 0 deletions app/Filament/Resources/UserResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class UserResource extends Resource

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

protected static ?int $navigationSort = 3;

public static function form(Form $form): Form
{
return $form
Expand Down
4 changes: 4 additions & 0 deletions app/Providers/Filament/AdminPanelProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ public function panel(Panel $panel): Panel
->collapsible(false),
])
->navigationItems([
NavigationItem::make('Home')
->url('/')
->icon('heroicon-o-home')
->sort(0),
NavigationItem::make('Documentation')
->url('https://docs.speedtest-tracker.dev/', shouldOpenInNewTab: true)
->icon('heroicon-o-book-open')
Expand Down

0 comments on commit 2cbace6

Please sign in to comment.