@extends('layouts.app') @push('css') @endpush @section('content')
@if (isset($info->exam->exam_title) && !empty($info->exam->exam_title))

{{$info->exam->exam_title}}

@else

Title

@endif

{{-- @foreach ($questions as $key=>$item) @if (isset($item->subject->title) && !empty($item->subject->title)) {{$item->subject->title}}, @else @endif @endforeach
@foreach ($questions as $key=>$item) @if (isset($item->chapter->name) && !empty($item->chapter->name)) {{$item->chapter->name}}, @else @endif @endforeach --}} {{-- @if (isset($details->user->name) && !empty($details->user->name)) Question Made By {{$details->user->name}} @else Question Made By Admin @endif --}}

@csrf @foreach ($questions as $key=>$item)
{{$key+1}}. {{$item->setquestion->question}}

{{$item->mark}}


@php $allanswer=DB::table('question_answers')->where('setquestion_id',$item->setquestion->id)->first(); $options=DB::table('question_mcqs')->where('setquestion_id',$item->setquestion->id)->get(); $answers=DB::table('question_answers') ->select('question_answers.id','question_mcqs.option') ->join('question_mcqs','question_mcqs.id','=','question_answers.answer') ->where('question_answers.setquestion_id',$item->setquestion->id) ->first(); $finishTime = \Carbon\Carbon::parse($item->exam->end_time)->format('h:i A'); $ty1=\Carbon\Carbon::parse($finishTime)->diffInSeconds($time); $cal=$ty1*1000; @endphp @if(!$options->isEmpty()) @foreach($options as $key=>$option)
@endforeach @else
@error('answer') {{ $message }} @enderror
@endif
@endforeach
@endsection @push('js') @endpush