@extends('layouts.admin-master') @section('title', 'Participants list') @section('css') @endsection @section('content')

Participants List

Quiz lists @if(in_array(Auth::guard('admin')->user()->id, [1,7])) Top Participants@endif
@if(count($quizParticipants)>0) @foreach($quizParticipants as $index => $quizParticipant) @php $total_ans = count($quizParticipant->quizAnswers); try { $right_ans = (count($quizParticipant->quizAnswers)>0) ? array_count_values(array_column($quizParticipant->quizAnswers->toArray(), 'right_answer'))[1] : 0; } catch (\Exception $e) { $right_ans = 0; } @endphp @endforeach @else @endif
# Customer Division Order Id Right_Ans Wrong_Ans Question Participate date Payment Actions
{{(($quizParticipants->perPage() * $quizParticipants->currentPage() - $quizParticipants->perPage()) + ($index+1) )}} {{ $quizParticipant->name }}

{{ $quizParticipant->mobile }}

{{$quizParticipant->division_name}}
{{$quizParticipant->address}}
{{$quizParticipant->order_id}} {{$right_ans}} {{$total_ans - $right_ans}} {{$total_ans}} {{\Carbon\Carbon::parse($quizParticipant->participate_date)->format(Config::get('siteSetting.date_format'))}}

{{\Carbon\Carbon::parse($quizParticipant->participate_date)->format('h:i:s A')}}

{{ str_replace( '-', ' ', $quizParticipant->payment_method) }} @if($quizParticipant->payment_info) @if($quizParticipant->tnx_id) Tnx_id: {{$quizParticipant->tnx_id}}
@endif {{$quizParticipant->payment_info}}
@endif

No quiz participant found.

{{$quizParticipants->appends(request()->query())->links()}}
Showing {{ $quizParticipants->firstItem() }} to {{ $quizParticipants->lastItem() }} of total {{$quizParticipants->total()}} entries ({{$quizParticipants->lastPage()}} Pages)
@endsection @section('js') @endsection