From c2f1ef322891ae43703208960ff30c4099b66f20 Mon Sep 17 00:00:00 2001 From: Dennis Elsinga Date: Fri, 15 Dec 2023 11:59:56 +0100 Subject: [PATCH] Add config key for navigation icon --- config/resource-lock.php | 1 + src/Resources/ResourceLockResource.php | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/config/resource-lock.php b/config/resource-lock.php index b7ae009..19fc7b5 100644 --- a/config/resource-lock.php +++ b/config/resource-lock.php @@ -62,6 +62,7 @@ 'manager' => [ 'navigation_badge' => false, + 'navigation_icon' => 'heroicon-o-lock-closed', 'navigation_label' => 'Resource Lock Manager', 'plural_label' => 'Resource Locks', 'navigation_group' => 'Settings', diff --git a/src/Resources/ResourceLockResource.php b/src/Resources/ResourceLockResource.php index 7cc7653..a88a711 100644 --- a/src/Resources/ResourceLockResource.php +++ b/src/Resources/ResourceLockResource.php @@ -13,7 +13,13 @@ class ResourceLockResource extends Resource { - protected static ?string $navigationIcon = 'heroicon-o-lock-closed'; + /** + * @return string|null + */ + public static function getNavigationIcon(): ?string + { + return __(config('resource-lock.manager.navigation_icon', 'heroicon-o-lock-closed')); + } public static function getModel(): string {