@if (sizeof($exam->examCategory) > 0)
{{ trans('messages.You can add new exam category from here') }}
@endif
@forelse ($exam->examCategory as $category)
{{ $category->{'name_' . App::getLocale()} }}
@can('exam_category_edit')
@endcan
@if (sizeof($category->questions) > 0)
{{ trans('messages.You can add new question from here') }}
@endif
@forelse ($category->questions as $key => $question)
@if ($question->question_type == 'mcq' || $question->question_type == 'text_input')
@php
if ($question->question_image) {
$link = $question->question_image;
} else {
$link = '/images/noimg.png';
}
@endphp
@if(in_array(pathinfo($link, PATHINFO_EXTENSION),["jpg","jpeg","gif","png","bmp"]))
 }})
@else
@endif
@elseif($question->question_type == 'drag_drop')
@forelse ($question->answers as $key2 => $answer)
{{ $answer->{'answer_' . App::getLocale()} }}
@empty
@endforelse
@php
if ($question->question_image) {
$link = $question->question_image;
} else {
$link = '/images/noimg.png';
}
@endphp
@if(in_array(pathinfo($link, PATHINFO_EXTENSION),["jpg","jpeg","gif","png","bmp"]))
 }})
@else
@endif
@elseif($question->question_type == 'mcq_image')
- {{ $question->{'question_' . App::getLocale()} }}
@can('question_update')
@endcan
@if (sizeof($question->answers) > 0)
{{ trans('messages.You can add new answer from here') }}
@endif
@forelse ($question->answers as $key2 => $answer)
@empty
{{ trans('messages.There is no answers in this question you can add one from here') }}
@endforelse
@endif
@empty
{{ trans('messages.There is no questions in this category you can add one from here') }}
@endforelse
{{ trans('messages.You can add new question from here') }}
@empty
{{ trans('messages.There is no categories in this exam you can add one from here') }}
@endforelse