@php $isEdit = isset($department) && $department->exists; $action = $isEdit ? route('applications.departments.update', $department->id) : route('applications.departments.store'); $memberExts = collect($members ?? [])->pluck('extension')->all(); // Build lookup: ext => name $extMap = collect($allExtensions)->keyBy('id'); @endphp
@push('plugin-scripts') @endpush