From f6179a01433cf203880927a4400fa1b2b6a18c9e Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Mon, 20 Jul 2026 08:50:53 +0530 Subject: [PATCH] modified logic in loading inter unit staff codes --- app/Filament/Resources/VisitorEntryResource.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Filament/Resources/VisitorEntryResource.php b/app/Filament/Resources/VisitorEntryResource.php index 0b07173..7f94288 100644 --- a/app/Filament/Resources/VisitorEntryResource.php +++ b/app/Filament/Resources/VisitorEntryResource.php @@ -69,7 +69,13 @@ class VisitorEntryResource extends Resource ->options( EmployeeMaster::distinct() ->orderBy('code') - ->pluck('code', 'code') + ->get(['code', 'name']) + ->mapWithKeys(function ($employee) { + return [ + $employee->code => "{$employee->code} ({$employee->name})" + ]; + }) + // ->pluck('code', 'code') ) ->searchable() ->reactive()