Нема описа
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.

index.blade.php 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. @extends('admin.layouts.app')
  2. @section('content')
  3. {{-- start patern --}}
  4. <div class="card shadow mt-2">
  5. <div class="card-header bg-transparent">
  6. <div class="row align-items-center">
  7. <div class="col">
  8. <h6 class="text-uppercase text-muted ls-1 mb-1">{{ $sub_header }}</h6>
  9. <h2 class="mb-0">{{ $header }}</h2>
  10. </div>
  11. <div class="col text-right">
  12. <a href="{{ route($route.'create') }}" class="btn btn-success">Tambah</a>
  13. </div>
  14. </div>
  15. </div>
  16. <div class="card-body table-responsive">
  17. <table class="table align-items-center border" id="data-table">
  18. <thead class="thead-light">
  19. <tr>
  20. <th width="5%" scope="col">No</th>
  21. <th scope="col">Pertanyaan</th>
  22. <th scope="col">Gambar</th>
  23. <th scope="col">Jawaban</th>
  24. <th scope="col">Aksi</th>
  25. </tr>
  26. </thead>
  27. </table>
  28. </div>
  29. </div>
  30. {{-- end pattern- --}}
  31. @endsection
  32. @push('js')
  33. <script src="{{ asset('assets') }}/js/blockUI.js"></script>
  34. <script src="{{ asset('assets') }}/js/sweetalert2.js"></script>
  35. <script src="{{ asset('assets') }}/js/custom.js"></script>
  36. <script src="{{ asset('assets') }}/js/custom_datatable.js"></script>
  37. <script>
  38. $(document).ready(function () {
  39. var id_datatable = "#data-table";
  40. var url_ajax = '{!! route($route.'get_data') !!}';
  41. var column = [
  42. { data: 'DT_RowIndex', searchable: false, orderable: false, className: 'dt-center' },
  43. { data: 'question', name: 'question' },
  44. { data: 'image', name: 'image' },
  45. { data: 'answer', name: 'answer' },
  46. { data: 'aksi', name: 'aksi' },
  47. ];
  48. global.init_datatable(id_datatable, url_ajax, column);
  49. });
  50. </script>
  51. @endpush