From b51f3b696850d2ecb7dd016b79a79d6c8678ce4d Mon Sep 17 00:00:00 2001 From: Gaetan <72258504+gaetan-hexadog@users.noreply.github.com> Date: Sun, 1 Sep 2024 20:36:43 +0200 Subject: [PATCH 1/3] Update filament-email.php Add cluster option for resource --- config/filament-email.php | 1 + 1 file changed, 1 insertion(+) diff --git a/config/filament-email.php b/config/filament-email.php index 275fd24..b9061b0 100644 --- a/config/filament-email.php +++ b/config/filament-email.php @@ -8,6 +8,7 @@ 'resource' => [ 'class' => EmailResource::class, 'model' => Email::class, + 'cluster' => null, 'group' => null, 'sort' => null, 'icon' => null, From f7fbfa41775ab52cc38f7e5638fa59e23972837e Mon Sep 17 00:00:00 2001 From: Gaetan <72258504+gaetan-hexadog@users.noreply.github.com> Date: Sun, 1 Sep 2024 20:37:44 +0200 Subject: [PATCH 2/3] Update EmailResource.php Override getCluster method to use config value --- src/Filament/Resources/EmailResource.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Filament/Resources/EmailResource.php b/src/Filament/Resources/EmailResource.php index c6b5a48..b2c58ce 100644 --- a/src/Filament/Resources/EmailResource.php +++ b/src/Filament/Resources/EmailResource.php @@ -42,6 +42,14 @@ public static function getBreadcrumb(): string return __('filament-email::filament-email.email_log'); } + /** + * @return class-string | null + */ + public static function getCluster(): ?string + { + return config('filament-email.resource.cluster'); + } + public static function getNavigationLabel(): string { return config('filament-email.label') ?? __('filament-email::filament-email.navigation_label'); From 33e76495b74d81f6e41a66d3a01c0c8802d4784a Mon Sep 17 00:00:00 2001 From: Gaetan <72258504+gaetan-hexadog@users.noreply.github.com> Date: Sun, 1 Sep 2024 20:38:54 +0200 Subject: [PATCH 3/3] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 33fc8c1..c7e0de1 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ return [ 'resource' => [ 'class' => EmailResource::class, 'model' => Email::class, + 'cluster' => null, 'group' => null, 'sort' => null, 'icon' => null,