From 7c731cfa6e9cb324b53d3e286384577f01507905 Mon Sep 17 00:00:00 2001 From: Abdelrahman Saeed Elhassan Yousif Date: Thu, 31 Oct 2024 08:27:37 +0200 Subject: [PATCH] Adding resource cluster and navigation from config file --- config/filament-logger.php | 2 ++ src/Resources/ActivityResource.php | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/config/filament-logger.php b/config/filament-logger.php index 265a872..4723020 100644 --- a/config/filament-logger.php +++ b/config/filament-logger.php @@ -13,6 +13,8 @@ 'exclude' => [ //App\Filament\Resources\UserResource::class, ], + 'cluster' => null, + 'navigation_group' =>'Settings', ], 'access' => [ diff --git a/src/Resources/ActivityResource.php b/src/Resources/ActivityResource.php index 6c79d68..b517409 100644 --- a/src/Resources/ActivityResource.php +++ b/src/Resources/ActivityResource.php @@ -31,6 +31,12 @@ class ActivityResource extends Resource protected static ?string $navigationIcon = 'heroicon-o-clipboard-list'; + + public static function getCluster(): ?string + { + return config('filament-logger.resources.cluster'); + } + public static function form(Form $form): Form { return $form @@ -319,7 +325,7 @@ public static function getPluralLabel(): string public static function getNavigationGroup(): ?string { - return __('filament-logger::filament-logger.nav.group'); + return __(config('filament-logger.resources.navigation_group','Settings')); } public static function getNavigationLabel(): string