From 291bea3d2691018e669f8884730205b19d9b637c Mon Sep 17 00:00:00 2001 From: HUSAM TAREQ AL-SHAIBANI Date: Thu, 12 Dec 2024 00:55:34 +0300 Subject: [PATCH] add Closure to navigationGroup in EmailTemplatesPlugin.php add Closure to navigationGroup --- src/EmailTemplatesPlugin.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/EmailTemplatesPlugin.php b/src/EmailTemplatesPlugin.php index b6e93d8..33899a2 100644 --- a/src/EmailTemplatesPlugin.php +++ b/src/EmailTemplatesPlugin.php @@ -13,7 +13,7 @@ class EmailTemplatesPlugin implements Plugin { use EvaluatesClosures; - public string $navigationGroup; + protected string|Closure|null $navigationGroup = null; protected bool|Closure|null $navigation = null; @@ -44,7 +44,7 @@ public function shouldRegisterNavigation(): bool return $this->evaluate($this->navigation) ?? config('filament-email-templates.navigation.enabled',true); } - public function navigationGroup(string $navigationGroup): static + public function navigationGroup(string|Closure|null $navigationGroup): static { $this->navigationGroup = $navigationGroup; return $this; @@ -53,7 +53,7 @@ public function navigationGroup(string $navigationGroup): static public function getNavigationGroup(): ?string { - return $this->navigationGroup ?? config('filament-email-templates.navigation.templates.group'); + return $this->evaluate($this->navigationGroup) ?? config('filament-email-templates.navigation.templates.group'); } public function register(Panel $panel): void