classSection ->newQuery() ->whereIn('id', $sectionIds) ->get() ->mapWithKeys(function ($section) { $name = $section->class_section_name ?? $section->section_name ?? $section->name ?? ''; return [(int) $section->id => (string) $name]; }) ->all(); } }