Geen omschrijving
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

update.blade.php 3.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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($data->id) }}">
  16. <div class="form-group">
  17. <label for="title"> Title <span class="text-danger">*</span> </label>
  18. <input type="text" name="title" value="{{ $data->title }}" 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/tips/'.$data->thumbnail) }}" 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. <div class="form-group">
  32. <label for="content"> Content <span class="text-danger">*</span> </label>
  33. <textarea class="form-control summernote" name="content" id="content">{!! $data->content !!}</textarea>
  34. </div>
  35. <div class="form-group">
  36. <label for="subtitle"> Subtitle <span class="text-danger">*</span> </label>
  37. <textarea class="form-control summernote" name="sub_title" id="subtitle">{!! $data->sub_title !!}</textarea>
  38. </div>
  39. <div class="form-group">
  40. <label for="date_publish"> Date Publish <span class="text-danger">*</span> </label>
  41. <input type="text" name="date_publish" value="{{ $data->date_publish }}" class="form-control flat-picker-date" required id="date_publish" >
  42. </div>
  43. <div class="form-group">
  44. <button type="submit" class="btn btn-success">Simpan</button>
  45. <a class="btn btn-default bg-back" href="{{ route($route.'index') }}">Kembali</a>
  46. </div>
  47. </form>
  48. </div>
  49. </div>
  50. @endsection
  51. {{-- load JS yang lu perluin, selain itu no --}}
  52. @push('js')
  53. <script src="{{ asset('assets') }}/js/blockUI.js"></script>
  54. <script src="{{ asset('assets') }}/js/sweetalert2.js"></script>
  55. <script src="{{ asset('assets') }}/js/custom.js"></script>
  56. <script src="{{ asset('assets') }}/vendor/datetimepicker/moment.min.js"></script>
  57. <script src="{{ asset('assets') }}/vendor/datetimepicker/tempusdominus-bootstrap-4.min.js"></script>
  58. <link href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-bs4.min.css" rel="stylesheet">
  59. <script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-bs4.min.js"></script>
  60. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
  61. <script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
  62. <script>
  63. $('.summernote').summernote({
  64. height: 200
  65. });
  66. $('.flat-picker-date').flatpickr({
  67. enableTime: false,
  68. dateFormat: "Y-m-d",
  69. })
  70. </script>
  71. @endpush