diff --git a/config/admin-kit-localizations.php b/config/admin-kit-localizations.php index c8f7dbe..09c9580 100644 --- a/config/admin-kit-localizations.php +++ b/config/admin-kit-localizations.php @@ -6,4 +6,6 @@ 'path' => '{locale}.json', 'route_enabled' => true, + + 'navigation_group_enabled' => false, ]; diff --git a/resources/lang/en/localizations.php b/resources/lang/en/localizations.php index eff4f0f..326e609 100644 --- a/resources/lang/en/localizations.php +++ b/resources/lang/en/localizations.php @@ -4,6 +4,7 @@ 'resource' => [ 'label' => 'Localization', 'plural_label' => 'Localizations', + 'navigation_group' => 'Localizations', 'id' => 'ID', 'key' => 'Key', diff --git a/resources/lang/ru/localizations.php b/resources/lang/ru/localizations.php index 517d727..bf426a5 100644 --- a/resources/lang/ru/localizations.php +++ b/resources/lang/ru/localizations.php @@ -4,6 +4,7 @@ 'resource' => [ 'label' => 'Локализация', 'plural_label' => 'Локализации', + 'navigation_group' => 'Локализации', 'id' => 'ID', 'key' => 'Ключ', diff --git a/src/UI/Filament/Resources/LocalizationResource.php b/src/UI/Filament/Resources/LocalizationResource.php index 50ff6ce..49214de 100644 --- a/src/UI/Filament/Resources/LocalizationResource.php +++ b/src/UI/Filament/Resources/LocalizationResource.php @@ -101,9 +101,13 @@ public static function getPluralLabel(): ?string return __('admin-kit-localizations::localizations.resource.plural_label'); } - public static function getNavigationGroup(): string + public static function getNavigationGroup(): ?string { - return __('admin-kit-localizations::localizations.resource.plural_label'); + if (! config('admin-kit-localizations.navigation_group_enabled')) { + return null; + } + + return __('admin-kit-localizations::localizations.resource.navigation_group'); } public static function getRelations(): array