@foreach ($responses as $response) @php $answers = json_decode($response->answers, true) ?? []; @endphp @foreach ($answers as $questionId => $answer) @php $question = \App\Models\Question::find($questionId); @endphp @endforeach @endforeach
No Tanggal Isi Pertanyaan Jawaban
{{ $loop->parent->iteration }} {{ \Carbon\Carbon::parse($response->filled_at)->format('d M Y H:i') }} {{ $question->question_text ?? 'Pertanyaan ID '.$questionId }} @if (is_array($answer)) {{ implode(', ', $answer) }} @else {{ $answer }} @endif