@extends('layouts.app') @section('title', 'Edit question #' . $question->id) @section('breadcrumb') Dashboard Question bank #{{ $question->id }} Edit @endsection @push('styles') @endpush @section('content')
@csrf @method('PUT')

Question content

@error('question_text')
{{ $message }}
@enderror
@foreach(['a' => 'A', 'b' => 'B', 'c' => 'C', 'd' => 'D'] as $key => $label)
{{ $label }}
@error('option_'.$key)
{{ $message }}
@enderror @endforeach
@error('explanation')
{{ $message }}
@enderror

Settings

@foreach(['a' => 'A', 'b' => 'B', 'c' => 'C', 'd' => 'D'] as $key => $label) @php $selected = old('correct_answer', $question->correct_answer) === $key; @endphp @endforeach
@error('correct_answer')
{{ $message }}
@enderror
@error('status')
{{ $message }}
@enderror
Cancel
Question ID
#{{ $question->id }}
Created by
{{ $question->createdBy?->name ?? '—' }}
Created at
{{ $question->created_at->format('d M Y') }}
@if($question->updatedBy)
Last edited
{{ $question->updatedBy?->name }}
@endif
@endsection @push('scripts') @endpush