Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Clusters #62

Merged
merged 4 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 12 additions & 0 deletions config/translation-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions src/Resources/LanguageLineResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}