Skip to content

Commit

Permalink
Merge pull request #62 from edstevo/4.x
Browse files Browse the repository at this point in the history
Add Clusters
  • Loading branch information
Jehizkia authored Oct 11, 2024
2 parents 52af156 + 730728b commit 456eb08
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
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');
}
}

0 comments on commit 456eb08

Please sign in to comment.