index.blade.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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>{{__('Application API')}}</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" href="{{route('admin.api.index')}}">{{__('Application API')}}</a></li>
  14. </ol>
  15. </div>
  16. </div>
  17. </div>
  18. </section>
  19. <!-- END CONTENT HEADER -->
  20. <!-- MAIN CONTENT -->
  21. <section class="content">
  22. <div class="container-fluid">
  23. <div class="card">
  24. <div class="card-header">
  25. <div class="d-flex justify-content-between">
  26. <h5 class="card-title"><i class="fa fa-gamepad mr-2"></i>{{__('Application API')}}</h5>
  27. <a href="{{route('admin.api.create')}}" class="btn btn-sm btn-primary"><i
  28. class="fas fa-plus mr-1"></i>{{__('Create new')}}</a>
  29. </div>
  30. </div>
  31. <div class="card-body table-responsive">
  32. <table id="datatable" class="table table-striped">
  33. <thead>
  34. <tr>
  35. <th>{{__('Token')}}</th>
  36. <th>{{__('Memo')}}</th>
  37. <th>{{__('Last used')}}</th>
  38. <th></th>
  39. </tr>
  40. </thead>
  41. <tbody>
  42. </tbody>
  43. </table>
  44. </div>
  45. </div>
  46. </div>
  47. <!-- END CUSTOM CONTENT -->
  48. </section>
  49. <!-- END CONTENT -->
  50. <script>
  51. function submitResult() {
  52. return confirm("{{__('Are you sure you wish to delete?')}}") !== false;
  53. }
  54. document.addEventListener("DOMContentLoaded", function () {
  55. $('#datatable').DataTable({
  56. language: {
  57. url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{ $locale_datatables }}.json'
  58. },
  59. processing: true,
  60. serverSide: true,
  61. stateSave: true,
  62. ajax: "{{route('admin.api.datatable')}}",
  63. order: [[ 2, "desc" ]],
  64. columns: [
  65. {data: 'token'},
  66. {data: 'memo'},
  67. {data: 'last_used'},
  68. {data: 'actions' , sortable : false},
  69. ],
  70. fnDrawCallback: function( oSettings ) {
  71. $('[data-toggle="popover"]').popover();
  72. }
  73. });
  74. });
  75. </script>
  76. @endsection