@php $isEdit = isset($record) && $record->exists; $tenant_id = session('tenant_id'); // Extract settings from record for easier access $settings = []; if ($isEdit && isset($record->settings) && is_array($record->settings)) { $settings = $record->settings; } // Extract selected option IDs for JavaScript $selectedOptionIds = []; if (!empty($settings)) { foreach ($settings as $optionId => $optionData) { if (isset($optionData['is_selected']) && $optionData['is_selected']) { $selectedOptionIds[] = (int)$optionId; } } } @endphp
@if(session('error'))
{{ session('error') }}
@endif
@csrf @if($isEdit) @method('PUT') @endif @if($tenant_id) @endif
Type Details
@if(!$tenant_id)
@error('tenant_id') {{ $message }} @enderror
@endif
@error('user_type_id') {{ $message }} @enderror
@error('title') {{ $message }} @enderror
Options
@if(count($options) > 0) @foreach($options as $option)
id])) ? 'checked' : '' }}>
@endforeach @else
No options available. Please add options first.
@endif
Cancel