Nav apraksta
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

create.blade.php 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 }} Tambah</h2>
  9. </div>
  10. </div>
  11. </div>
  12. <div class="card-body">
  13. <form action="{{ route($route.'create_action') }}" class="form-global-handle" method="POST" enctype="multipart/form-data">
  14. @csrf
  15. <div class="form-group">
  16. <label for="title"> Title <span class="text-danger">*</span> </label>
  17. <input type="text" name="title" value="{{ old('title') }}" class="form-control" required id="title" >
  18. </div>
  19. <div class="form-group">
  20. <label for="deskripsi"> Gambar <span class="text-danger">*</span> </label>
  21. <input type="file" name="gambar" id="" class="form-control">
  22. </div>
  23. <div class="form-group">
  24. <label for="content"> Content <span class="text-danger">*</span> </label>
  25. <textarea class="form-control summernote" name="content" id="content"></textarea>
  26. </div>
  27. <div class="form-group">
  28. <label for="subtitle"> Subtitle <span class="text-danger">*</span> </label>
  29. <textarea class="form-control summernote" name="sub_title" id="subtitle"></textarea>
  30. </div>
  31. <div class="form-group">
  32. <label for="date_publish"> Date Publish <span class="text-danger">*</span> </label>
  33. <input type="text" name="date_publish" value="{{ old('date_publish') }}" class="form-control flat-picker-date" required id="date_publish" >
  34. </div>
  35. <div class="form-group">
  36. <button type="submit" class="btn btn-success">Simpan</button>
  37. <a class="btn btn-default bg-back" href="{{ route($route.'index') }}">Kembali</a>
  38. </div>
  39. </form>
  40. </div>
  41. </div>
  42. @endsection
  43. {{-- load JS yang lu perluin, selain itu no --}}
  44. @push('js')
  45. <script src="{{ asset('assets') }}/js/blockUI.js"></script>
  46. <script src="{{ asset('assets') }}/js/sweetalert2.js"></script>
  47. <script src="{{ asset('assets') }}/js/custom.js"></script>
  48. <script src="{{ asset('assets') }}/vendor/datetimepicker/moment.min.js"></script>
  49. <script src="{{ asset('assets') }}/vendor/datetimepicker/tempusdominus-bootstrap-4.min.js"></script>
  50. <link href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-bs4.min.css" rel="stylesheet">
  51. <script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-bs4.min.js"></script>
  52. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
  53. <script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
  54. <script>
  55. $('.summernote').summernote({
  56. height: 200
  57. });
  58. $('.flat-picker-date').flatpickr({
  59. enableTime: false,
  60. dateFormat: "Y-m-d",
  61. })
  62. </script>
  63. @endpush