fadlyshafa

Untitled

Jan 1st, 2020
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 3.16 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.  
  13.                     <a href="{{ url('laporan') }}" class="btn btn-sm btn-flat btn-primary"><i class="fa fa-refresh"></i> Get All Data</a>
  14.                 </p>
  15.             </div>
  16.             <div class="box-body">
  17.                
  18.                 <form class="form-inline" method="get" action="{{ url('lapora/periode') }}">
  19.                   <div class="form-group">
  20.                     <label for="email">Tanggal awal:</label>
  21.                     <input type="text" name="tanggal_awal" class="form-control datepicker" id="email" autocomplete="off" value="{{ date('Y-m-d') }}">
  22.                   </div>
  23.  
  24.                   <div class="form-group">
  25.                     <label for="pwd">Tanggal akhir:</label>
  26.                     <input type="text" name="tanggal_akhir" class="form-control datepicker" id="pwd" autocomplete="off" value="{{ date('Y-m-d') }}">
  27.                   </div>
  28.  
  29.                   <div class="form-group">
  30.                     <label for="pwd">user:</label>
  31.                     <select class="form-control select2" name="user">
  32.                         <option value="all">All Anggota</option>
  33.                         @foreach($users as $us)
  34.                         <option value="{{ $us->id }}">{{ $us->name }}</option>
  35.                         @endforeach
  36.                     </select>
  37.                   </div>
  38.                  
  39.                   <button type="submit" class="btn btn-default">Submit</button>
  40.                 </form>
  41.  
  42.                 <table class="table table-hover myTable">
  43.                     <thead>
  44.                         <tr>
  45.                             <th>#</th>
  46.                             <th>user</th>
  47.                             <th>buku</th>
  48.                             <th>status</th>
  49.                             <th>created at</th>
  50.                         </tr>
  51.                     </thead>
  52.                     <tbody>
  53.                         @foreach($data as $e=>$dt)
  54.                         <tr>
  55.                             <td>{{ $e+1 }}</td>
  56.                             <td>{{ $dt->user_r->name }}</td>
  57.                             <td>{{ $dt->buku_r->judul }}</td>
  58.  
  59.                            
  60.                             <td>{{ $dt->status_r->nama }}</td>
  61.  
  62.  
  63.                             <td>{{ date('d F Y H:i:s',strtotime($dt->created_at)) }}</td>
  64.                         </tr>
  65.                         @endforeach
  66.                     </tbody>
  67.                 </table>
  68.  
  69.             </div>
  70.         </div>
  71.     </div>
  72. </div>
  73.  
  74. @endsection
  75.  
  76. @section('scripts')
  77.  
  78. <script type="text/javascript">
  79.     $(document).ready(function(){
  80.  
  81.         // btn refresh
  82.         $('.btn-refresh').click(function(e){
  83.             e.preventDefault();
  84.             $('.preloader').fadeIn();
  85.             location.reload();
  86.         })
  87.  
  88.     })
  89. </script>
  90.  
  91. @endsection
Advertisement
Add Comment
Please, Sign In to add comment