@extends('backend.layouts.app') @section('content')
{{ translate('#') }} | {{ translate('Profile') }} | {{ translate('Name') }} | {{ translate('Email') }} | {{ translate('Mobile') }} | {{ translate('Points') }} | {{ translate('Wallet') }} | {{ translate('Life') }} | {{ translate('Life Special') }} | {{ translate('Hint') }} | {{ translate('Hint Special') }} | {{ translate('Play Quiz') }} | {{ translate('Action') }} |
---|---|---|---|---|---|---|---|---|---|---|---|---|
{{ str_pad($user->id, 5, '0', STR_PAD_LEFT) }} |
@if (empty($user->image))
@else
|
{{ $user->first_name . ' ' . $user->last_name }} | {{ $user->email }} | {{ $user->phone }} | {{ $user->points }} | {{ $user->wallet_amount }} | {{ $user->life }} | {{ $user->life_special }} | {{ $user->hint }} | {{ $user->hint_special }} | @php $quizzes = \App\Models\QuizParticipant::where('user_id', $user->id)->with('quiz.questions')->get(); $totalWins = 0; $totalQuizzes = $quizzes->count(); $quizzes->each(function ($quizParticipant) use (&$totalWins) { $quizId = $quizParticipant->quiz_id; $totalQuestions = $quizParticipant->quiz->questions->count(); $correctAnswersCount = \App\Models\QuizContest::where('quiz_id', $quizId) ->where('user_id', auth()->id()) ->where('is_correct', 1) ->count(); if ($correctAnswersCount == $totalQuestions) { $totalWins++; } }); @endphp
|
{{ $user->isBanned() }}
|
{{translate('No users available.')}} |