index.blade.php 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. @extends('layouts.main')
  2. @section('content')
  3. <!-- CONTENT HEADER -->
  4. <section class="content-header">
  5. <div class="container-fluid">
  6. <div class="row mb-2">
  7. <div class="col-sm-6">
  8. <h1>Configurations</h1>
  9. </div>
  10. <div class="col-sm-6">
  11. <ol class="breadcrumb float-sm-right">
  12. <li class="breadcrumb-item"><a href="{{route('home')}}">Dashboard</a></li>
  13. <li class="breadcrumb-item"><a class="text-muted"
  14. href="{{route('admin.configurations.index')}}">Configurations</a></li>
  15. </ol>
  16. </div>
  17. </div>
  18. </div>
  19. </section>
  20. <!-- END CONTENT HEADER -->
  21. <!-- MAIN CONTENT -->
  22. <section class="content">
  23. <div class="container-fluid">
  24. <div class="card">
  25. <div class="card-header">
  26. <div class="d-flex justify-content-between">
  27. <h5 class="card-title"><i class="fas fa-cog mr-2"></i>Configurations</h5>
  28. </div>
  29. </div>
  30. <div class="card-body table-responsive">
  31. <table id="datatable" class="table table-striped">
  32. <thead>
  33. <tr>
  34. <th>Key</th>
  35. <th>Value</th>
  36. <th>Type</th>
  37. <th width="600">Description</th>
  38. <th>Created at</th>
  39. <th></th>
  40. </tr>
  41. </thead>
  42. <tbody>
  43. </tbody>
  44. </table>
  45. </div>
  46. </div>
  47. </div>
  48. <!-- END CUSTOM CONTENT -->
  49. </section>
  50. <!-- END CONTENT -->
  51. @include('admin.configurations.editModel')
  52. <script>
  53. document.addEventListener("DOMContentLoaded", function () {
  54. $('#datatable').DataTable({
  55. processing: true,
  56. serverSide: true,
  57. stateSave: true,
  58. ajax: "{{route('admin.configurations.datatable')}}",
  59. columns: [
  60. {data: 'key'},
  61. {data: 'value'},
  62. {data: 'type'},
  63. {data: 'description'},
  64. {data: 'created_at'},
  65. {data: 'actions', sortable: false},
  66. ],
  67. fnDrawCallback: function( oSettings ) {
  68. $('[data-toggle="popover"]').popover();
  69. }
  70. });
  71. });
  72. </script>
  73. @endsection