fadlyshafa

Untitled

Jan 25th, 2020
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 2.64 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('karyawan/add') }}" class="btn btn-sm btn-flat btn-primary"><i class="fa fa-plus"></i> Tambah Data</a>
  14.                 </p>
  15.             </div>
  16.             <div class="box-body">
  17.                
  18.                 <div class="table-responsive">
  19.                     <table class="table table-hover myTable">
  20.                         <thead>
  21.                             <tr>
  22.                                 <th>action</th>
  23.                                 <th>no</th>
  24.                                 <th>email</th>
  25.                                 <th>nama</th>
  26.                                 <th>created at</th>
  27.                                 <th>updated at</th>
  28.                             </tr>
  29.                         </thead>
  30.                         <tbody>
  31.                             @foreach($data as $e=>$dt)
  32.                             <tr>
  33.                                 <td>
  34.                                     <div style="width:60px">
  35.                                         <a href="{{ url('karyawan/'.$dt->id) }}" class="btn btn-warning btn-xs btn-edit" id="edit"><i class="fa fa-pencil-square-o"></i></a>
  36.  
  37.                                         <button href="{{ url('karyawan/'.$dt->id) }}" class="btn btn-danger btn-xs btn-hapus" id="delete"><i class="fa fa-trash-o"></i></button>
  38.                                     </div>
  39.                                 </td>
  40.                                 <td>{{ $e+1 }}</td>
  41.                                 <td>{{ $dt->email }}</td>
  42.                                 <td>{{ $dt->name }}</td>
  43.                                 <td>{{ date('d F Y H:i:s',strtotime($dt->created_at)) }}</td>
  44.                                 <td>{{ date('d F Y H:i:s',strtotime($dt->updated_at)) }}</td>
  45.                             </tr>
  46.                             @endforeach
  47.                         </tbody>
  48.                     </table>
  49.                 </div>
  50.  
  51.             </div>
  52.         </div>
  53.     </div>
  54. </div>
  55.  
  56. @endsection
  57.  
  58. @section('scripts')
  59.  
  60. <script type="text/javascript">
  61.     $(document).ready(function(){
  62.  
  63.         // btn refresh
  64.         $('.btn-refresh').click(function(e){
  65.             e.preventDefault();
  66.             $('.preloader').fadeIn();
  67.             location.reload();
  68.         })
  69.  
  70.     })
  71. </script>
Add Comment
Please, Sign In to add comment