diff --git a/README.md b/README.md index 47ab699..9facf99 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,16 @@ Disable registering the translation manager navigation on certain panel IDs. The ], ``` +### Adding to cluster +Example of adding the translation manager to a cluster: +```php +// config/translation-manager.php +[ + // ...Other config + 'cluster' => \App\Filament\Clusters\Products::class, +] +``` + ## Usage Once installed, the Translation Manager can be accessed via the Filament sidebar menu. Simply click on the "Translation Manager" link to access the translation management screen. diff --git a/config/translation-manager.php b/config/translation-manager.php index ba53310..f09bf46 100644 --- a/config/translation-manager.php +++ b/config/translation-manager.php @@ -69,6 +69,18 @@ 'navigation_group' => null, + /* + |-------------------------------------------------------------------------- + | Clusters + |-------------------------------------------------------------------------- + | + | 'cluster' is the cluster in which the translation manager is displayed. + | For instance, it could be set to '\App\Filament\Clusters\Admin::class'. + | + */ + + 'cluster' => null, + /* |-------------------------------------------------------------------------- | Navigation Icon diff --git a/src/Resources/LanguageLineResource.php b/src/Resources/LanguageLineResource.php index 4cac6ee..fcdde0e 100644 --- a/src/Resources/LanguageLineResource.php +++ b/src/Resources/LanguageLineResource.php @@ -185,4 +185,9 @@ public static function getNavigationGroup(): ?string return config('translation-manager.navigation_group'); } + + public static function getCluster(): ?string + { + return config('translation-manager.cluster'); + } }