Completed Questions
@if($questions->count())
@foreach($questions as $question)
@endforeach
{{ $question->question }}
{{ $question->description }}
@if ($question->polling == 2) @php $options = DB::table('questionoptions') ->where('question_id', $question->id) ->get(); @endphp
Polling Options:
@endif
@foreach ($options as $opt)
@endforeach
{{ $opt->options_str }}
Yes: {{ $opt->yes_point }}
No: {{ $opt->no_point }}
Result:
@if($opt->result == 1) Yes
@elseif($opt->result == 2) No
@else Pending
@endif
Filter1: {{ $question->filter1 ?? '-' }}
Filter2: {{ $question->filter2 ?? '-' }}
@php
$statusLabels = [
1 => ['text' => 'Upcoming', 'color' => 'secondary'],
2 => ['text' => 'Live', 'color' => 'success'],
3 => ['text' => 'Completed', 'color' => 'primary'],
4 => ['text' => 'Canceled', 'color' => 'danger'],
5 => ['text' => 'Paused', 'color' => 'warning'],
];
$status = $statusLabels[$question->status] ?? ['text' => 'Unknown', 'color' => 'light'];
@endphp
Status:
{{ $status['text'] }}
Yes Point: {{ $question->yes_point }}
|
No Point: {{ $question->no_point }}
Start On:
{{ $question->start_on ? \Carbon\Carbon::parse($question->start_on)->format('d M Y h:i A') : 'N/A' }}
@if($question->expires_in)
Expires In:
{{ \Carbon\Carbon::parse($question->expires_in)->format('d M Y h:i A') }}
@endif
{{ $questions->links('pagination::bootstrap-4') }}
@else
No completed questions available.
@endif