@extends('admin.layout.baseNew') @section('styles') @endsection @section('content')

Vote

Question : @if(count($votes)>0) {{$votes[0]['votequestion']['questions']}} @endif
Question Type: @if(count($votes)>0) @if($votes[0]['votequestion']['question_type']==0) Yes/No @elseif($votes[0]['votequestion']['question_type']==1) Optional @elseif($votes[0]['votequestion']['question_type']==2) Multiple Choice @endif @endif
@foreach($votes as $index => $value) @php $question_type=$value->votequestion->question_type; @endphp @endforeach
Sn. Users Answer
{{$index+1}} {{$value->user->name}} @if($question_type == 0) @php $answer = ($value->answer == 1) ? "Yes" : "No"; @endphp {{$answer}} @endif @if($question_type == 1) @foreach($value->votequestion->votechild as $value1) @if($value->answer==$value1->id) {{$value1->question_choice}} @endif @endforeach @endif @if($question_type == 2) @foreach($value->votequestion->votechild as $index => $value1) @if(isset($answer[$index])) @if($answer[$index]==$value1->id) {{$value1->question_choice}}@if($answer_key!=$index), @endif @endif @endif @endforeach @endif
@endsection @section('scripts') @endsection @section('nav-adm-vote-class', 'active')