fadlyshafa

Untitled

Dec 31st, 2019
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.77 KB | None | 0 0
  1. @extends('layouts.master')
  2.  
  3. @section('content')
  4.  
  5. <div class="row">
  6.     <div class="col-md-12">
  7.         <h4>{{ $title }}</h4>
  8.         <div class="box box-warning">
  9.             <div class="box-header">
  10.                 <p>
  11.                     <button class="btn btn-sm btn-flat btn-warning btn-refresh"><i class="fa fa-refresh"></i> Refresh</button>
  12.                 </p>
  13.             </div>
  14.             <div class="box-body">
  15.                
  16.                 <table class="table table-hover myTable">
  17.                     <thead>
  18.                         <tr>
  19.                             <th>#</th>
  20.                             <th>user</th>
  21.                             <th>buku</th>
  22.                             <th>status</th>
  23.                             <th>created at</th>
  24.                         </tr>
  25.                     </thead>
  26.                     <tbody>
  27.                         @foreach($data as $e=>$dt)
  28.                         <tr>
  29.                             <td>{{ $e+1 }}</td>
  30.                             <td>{{ $dt->user_r->name }}</td>
  31.                             <td>{{ $dt->buku_r->judul }}</td>
  32.  
  33.                            
  34.                             <td>{{ $dt->status_r->nama }}</td>
  35.  
  36.  
  37.                             <td>{{ $dt->created_at }}</td>
  38.                         </tr>
  39.                         @endforeach
  40.                     </tbody>
  41.                 </table>
  42.  
  43.             </div>
  44.         </div>
  45.     </div>
  46. </div>
  47.  
  48. @endsection
  49.  
  50. @section('scripts')
  51.  
  52. <script type="text/javascript">
  53.     $(document).ready(function(){
  54.  
  55.         // btn refresh
  56.         $('.btn-refresh').click(function(e){
  57.             e.preventDefault();
  58.             $('.preloader').fadeIn();
  59.             location.reload();
  60.         })
  61.  
  62.     })
  63. </script>
  64.  
  65. @endsection
Add Comment
Please, Sign In to add comment