@php $id = $brand->brands_data_id; $isSelected = $brandRules[$id]['selected'] ?? false; $isSaved = $brandRules[$id]['saved'] ?? false; @endphp