Skip to content

Commit 9dc5885

Browse files
committed
docs: add settings cluster info
1 parent aabf2cb commit 9dc5885

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/core-concepts/settings.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ php artisan make:filament-settings-page ManageMyPackage MyPackageSettings
2222
For **plugin-level settings**, the following should be used:
2323
* Your service provider should extend our `Eclipse\Common\Foundation\Providers\PackageServiceProvider` class.
2424
* Your package definition should include a call to the `hasSettings()` method, so that the plugin's settings and settings migrations are auto-discovered.
25+
* If you want to include the settings page in the default Eclipse Settings cluster to have all settings in one place, add the `getCluster()` method and return our cluster class (see below). You can also use any other cluster.
2526

2627
E.g.:
2728

@@ -41,6 +42,12 @@ class MyPackageServiceProvider extends PackageServiceProvider
4142
$package->name('my_package')
4243
->hasSettings();
4344
}
45+
46+
public static function getCluster(): ?string
47+
{
48+
return app(CommonPlugin::class)->getSettingsCluster();
49+
}
50+
}
4451
```
4552

4653
### Permissions

0 commit comments

Comments
 (0)