fadlyshafa

Untitled

Nov 6th, 2019
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.70 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.                <table class="table table-hover">
  16.                    <thead>
  17.                        <tr>
  18.                            <th>#</th>
  19.                            <th>user</th>
  20.                            <th>buku</th>
  21.                            <th>penulis buku</th>
  22.                            <th>created_at</th>
  23.                        </tr>
  24.                    </thead>
  25.                    <tbody>
  26.                        @foreach($data as $e=>$dt)
  27.                        <tr>
  28.                            <td>{{ $e+1 }}</td>
  29.                            <td>{{ $dt->user_r->name }}</td>
  30.                            <td>{{ $dt->buku_r->judul }}</td>
  31.                            <td>{{ $dt->buku_r->penulis }}</td>
  32.                            <td>{{ $dt->created_at }}</td>
  33.                        </tr>
  34.                        @endforeach
  35.                    </tbody>
  36.                </table>
  37.             </div>
  38.         </div>
  39.     </div>
  40. </div>
  41.  
  42. @endsection
  43.  
  44. @section('scripts')
  45.  
  46. <script type="text/javascript">
  47.     $(document).ready(function(){
  48.  
  49.         // btn refresh
  50.         $('.btn-refresh').click(function(e){
  51.             e.preventDefault();
  52.             $('.preloader').fadeIn();
  53.             location.reload();
  54.         })
  55.  
  56.     })
  57. </script>
  58.  
  59. @endsection
Add Comment
Please, Sign In to add comment