$record->id]) }}', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CSRF-TOKEN': '{{ csrf_token() }}'
},
body: JSON.stringify({
category_id: this.categoryId,
is_expanded: this.isExpanded
})
});
const data = await response.json();
if (!data.success) {
console.error('Failed to save category state:', data.message);
}
} catch (error) {
console.error('Error saving category state:', error);
}
}
}"
data-category-id="{{ $category->id ?? null }}">
{{ count($questions) }} {{ count($questions) === 1 ? 'question' : 'questions' }}
@foreach ($questions as $question)
{{ $question->name }}
@if($question->description)
{{ $question->description }}
@endif
@if($question->contentType ?? null)
{{ $question->contentType->name ?? 'N/A' }}
@endif
@endforeach
@empty
No questions added yet. Add your first question below.
@endforelse
{{-- Add Question Button --}}