Нет описания
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. @extends('admin.layouts.app')
  2. @section('content')
  3. <div class="card shadow">
  4. <div class="card-header bg-transparent">
  5. <div class="row align-items-center">
  6. <div class="col">
  7. <h6 class="text-uppercase text-muted ls-1 mb-1">{{ $sub_header }}</h6>
  8. <h2 class="mb-0">{{ $header }} Update</h2>
  9. </div>
  10. </div>
  11. </div>
  12. <div class="card-body">
  13. <form action="{{ route($route.'update_action') }}" class="form-global-handle" method="POST" enctype="multipart/form-data">
  14. @csrf
  15. <input type="hidden" name="id" value="{{ Hashids::encode($trivia->id) }}">
  16. <div class="form-group">
  17. <label for="title"> Pertanyaan <span class="text-danger">*</span> </label>
  18. <input type="text" name="question" value="{{ $trivia->question }}" class="form-control" required id="title" >
  19. </div>
  20. <div class="form-group">
  21. <div class="row">
  22. <div class="col-md-2">
  23. <img src="{{ asset('storage/images/trivia/'.$trivia->image) }}" alt="..." class="img-thumbnail" style="width:100px">
  24. </div>
  25. <div class="col-md-10">
  26. <label for="deskripsi"> Gambar (Ganti Foto)</label>
  27. <input type="file" name="gambar" id="" class="form-control">
  28. </div>
  29. </div>
  30. </div>
  31. @foreach ($trivia_answer as $item)
  32. <div class="form-group">
  33. <label for="answer"> Jawaban {{ ($item->is_right=="t")?"(Benar)":"(Salah)" }} <span class="text-danger">*</span> </label>
  34. <input type="text" name="answer[{{$item->id}}]" value="{{ $item->answer }}" class="form-control" required >
  35. </div>
  36. @endforeach
  37. <div class="form-group">
  38. <button type="submit" class="btn btn-success">Simpan</button>
  39. <a class="btn btn-default bg-back" href="{{ route($route.'index') }}">Kembali</a>
  40. </div>
  41. </form>
  42. </div>
  43. </div>
  44. @endsection
  45. {{-- load JS yang lu perluin, selain itu no --}}
  46. @push('js')
  47. <script src="{{ asset('assets') }}/js/blockUI.js"></script>
  48. <script src="{{ asset('assets') }}/js/sweetalert2.js"></script>
  49. <script src="{{ asset('assets') }}/js/custom.js"></script>
  50. <script src="{{ asset('assets') }}/vendor/datetimepicker/moment.min.js"></script>
  51. <script src="{{ asset('assets') }}/vendor/datetimepicker/tempusdominus-bootstrap-4.min.js"></script>
  52. <link href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-bs4.min.css" rel="stylesheet">
  53. <script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-bs4.min.js"></script>
  54. <script>
  55. $('#summernote').summernote({
  56. height: 200
  57. });
  58. </script>
  59. @endpush