From 78bfefa6ddb58091dea781ec276aaa3b432b21f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yahya=20Hindio=C4=9Flu?= <46659611+yahya077@users.noreply.github.com> Date: Mon, 8 Apr 2024 03:17:00 +0300 Subject: [PATCH] recordTitle fixed for user_name_column (#176) --- .../RoleResource/RelationManager/UserRelationManager.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Resources/RoleResource/RelationManager/UserRelationManager.php b/src/Resources/RoleResource/RelationManager/UserRelationManager.php index 8192399..e2d34e0 100644 --- a/src/Resources/RoleResource/RelationManager/UserRelationManager.php +++ b/src/Resources/RoleResource/RelationManager/UserRelationManager.php @@ -15,7 +15,10 @@ class UserRelationManager extends RelationManager { protected static string $relationship = 'users'; - protected static ?string $recordTitleAttribute = 'name'; + public static function getRecordTitleAttribute(): ?string + { + return config('filament-spatie-roles-permissions.user_name_column'); + } /* * Support changing tab title in RelationManager.