@if(isset($questions))
@for($questionCounter = 0; $questionCounter < count($questions); $questionCounter++)
@foreach($languages as $language)
local") ? 'is-invalid' : '' }}"
name="questions[{{ $questionCounter }}][title][{{ $language->local }}]"
placeholder="{{ __('exams::exams.question_title') }} {{ count($languages) > 1 ? "({$language->name})" : '' }} "
value='{{ old("questions.$questionCounter.title.$language->local", $questions[$questionCounter]['item_descriptions'][$language->id]['title'] ?? "") }}'/>
@endforeach
@include('admin.partials._upload_photo', [
'item_value' => old("questions.$questionCounter.image", $questions[$questionCounter]['image'] ?? ''),
'label_name' => __('exams::exams.image'),
'input_name' => 'questions[' . $questionCounter . '][image]',
'item_file_number' => '-question' . $questionCounter,
'parent_class' => 'col-md-8 content-types content-types-image'
])
@if(isset($questions[$questionCounter]['answers']))
@foreach($questions[$questionCounter]['answers'] as $optKey=>$answer)
@foreach($languages as $language)
local", $answer['item_descriptions'][$language->id]['title'] ?? "") }}"
placeholder="{{ __('exams::exams.answer_title') }} {{ count($languages) > 1 ? "({$language->name})" : '' }}"
class="form-control {{ $errors->has("questions.$questionCounter.answers.$optKey.title.$language->local") ? 'is-invalid' : '' }}"
required/>
@endforeach
@endforeach
@endif