@extends('layouts.admin.app') @section('content')
Kembali Ke Pertanyaan
Tambah Pertanyaan
Game / Pertanyaan / Tambah Pertanyaan
@php $textOption = [['answer' => '', 'value' => '', 'type' => '']]; $oldTextOptions = old('text_options') ?? $textOption; $textOptions = old('type') == 'text' ? $oldTextOptions : $textOption; $imageOption = [['image' => '', 'value' => '', 'type' => '']]; $oldImageOptions = old('image_options') ?? $imageOption; $imageOptions = old('type') == 'image' ? $oldImageOptions : $imageOption; @endphp
@csrf
@error('question')
{{ $message }}
@enderror
{{-- JAWABAN TEXT --}}
@foreach ($textOptions as $key => $option)
@error("text_options.{$key}.answer")
{{ $message }}
@enderror
@error("text_options.{$key}.value")
{{ $message }}
@enderror
@endforeach
Tambah Jawaban
{{-- JAWABAN TEXT --}} {{-- JAWABAN GAMBAR --}}
@foreach ($imageOptions as $key => $option)
@error("image_options.{$key}.image")
{{ $message }}
@enderror
@error("image_options.{$key}.value")
{{ $message }}
@enderror
@endforeach
Tambah Jawaban
{{-- JAWABAN GAMBAR --}}

@endsection @section('js') @endsection