diff --git a/app/Filament/Pages/PlayerProps.php b/app/Filament/Pages/PlayerProps.php index 6edc9f43..8f7d9b95 100644 --- a/app/Filament/Pages/PlayerProps.php +++ b/app/Filament/Pages/PlayerProps.php @@ -14,6 +14,7 @@ use BackedEnum; use Filament\Forms\Components\Select; use Filament\Forms\Concerns\InteractsWithForms; use Filament\Forms\Contracts\HasForms; +use Filament\Navigation\NavigationItem; use Filament\Pages\Page; use Filament\Schemas\Components\Utilities\Get; use Filament\Schemas\Schema; @@ -26,7 +27,18 @@ class PlayerProps extends Page implements HasForms protected string $view = 'filament.pages.player-props'; - public static bool $shouldOpenNavigationUrlInNewTab = true; + public static function getNavigationItems(): array + { + return [ + NavigationItem::make(static::getNavigationLabel()) + ->group(static::getNavigationGroup()) + ->icon(static::getNavigationIcon()) + ->activeIcon(static::getActiveNavigationIcon()) + ->isActiveWhen(fn() => request()->routeIs(static::getRouteName())) + ->sort(static::getNavigationSort()) + ->url(static::getUrl(), shouldOpenInNewTab: true), // 👈 Forces target="_blank" + ]; + } protected static string|BackedEnum|null $navigationIcon = 'icon-soccerplayer';