@foreach($questions as $question ) @endforeach @foreach($submissions as $submission) @forelse($submission as $key => $data) @if($key == 'answers') @foreach($data as $counter => $answer) @endforeach @else @endif @empty @endforelse @endforeach
{{ $question }}
@if(is_array($answer) || $answer instanceof \Illuminate\Support\Collection) {!! htmlspecialchars(collect($answer)->implode(', ')) !!} @else {{ htmlspecialchars($answer) }} @endif {{ htmlspecialchars($data) }}