@php // Fix: Get os_group_id from the relationship correctly $selectedOsGroupId = old('os_group_id') ?? ($model?->os?->os_group_id ?? null); @endphp