fadlyshafa

Untitled

Feb 21st, 2020
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 2.09 KB | None | 0 0
  1. @extends('dashboard.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>judul</th>
  21.                             <th>users</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->judul }}</td>
  31.                             <td>{{ $dt->users_r->name }}</td>
  32.                             <td>
  33.                                 @if($dt->status == null)
  34.                                 <label class="label label-warning">Belum Dibaca</label>
  35.                                 @else
  36.                                 <label class="label label-success">Sudah Dibaca</label>
  37.                                 @endif
  38.                             </td>
  39.                             <td>{{ date('d F Y H:i:s',strtotime($dt->created_at)) }}</td>
  40.                         </tr>
  41.                         @endforeach
  42.                     </tbody>
  43.                 </table>
  44.  
  45.             </div>
  46.         </div>
  47.     </div>
  48. </div>
  49.  
  50. @endsection
  51.  
  52. @section('scripts')
  53.  
  54. <script type="text/javascript">
  55.     $(document).ready(function(){
  56.  
  57.         // btn refresh
  58.         $('.btn-refresh').click(function(e){
  59.             e.preventDefault();
  60.             $('.preloader').fadeIn();
  61.             location.reload();
  62.         })
  63.  
  64.     })
  65. </script>
  66.  
  67. @endsection
Add Comment
Please, Sign In to add comment