Ordering/Sequence Question @include('dashboard.questions.tabs.add_question')
! Note - Enter items in correct order. Items will automatically shuffle while showing to users.
@php $defaultAnswers = old('answers', isset($question) && $question->questionAnswers->isNotEmpty() ? $question->questionAnswers->map(fn($qa) => ['answer' => $qa->answer->answer])->toArray() : [['answer' => ''], ['answer' => '']]); @endphp @foreach ($defaultAnswers as $index => $answer)
@error('answers.' . $index . '.answer')
{{ $message }}
@enderror
@if (count($defaultAnswers) > 2) @endif
@endforeach