Advertisement
fadlyshafa

Untitled

Jan 9th, 2020
403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 2.85 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('customer/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>no hp</th>
  27.                                 <th>alamat</th>
  28.                                 <th>created at</th>
  29.                                 <th>updated at</th>
  30.                             </tr>
  31.                         </thead>
  32.                         <tbody>
  33.                             @foreach($data as $e=>$dt)
  34.                             <tr>
  35.                                 <td>
  36.                                     <div style="width:60px">
  37.                                         <a href="{{ url('customer/'.$dt->id) }}" class="btn btn-warning btn-xs btn-edit" id="edit"><i class="fa fa-pencil-square-o"></i></a>
  38.  
  39.                                         <button href="{{ url('customer/'.$dt->id) }}" class="btn btn-danger btn-xs btn-hapus" id="delete"><i class="fa fa-trash-o"></i></button>
  40.                                     </div>
  41.                                 </td>
  42.                                 <td>{{ $e+1 }}</td>
  43.                                 <td>{{ $dt->email }}</td>
  44.                                 <td>{{ $dt->nama }}</td>
  45.                                 <td>{{ $dt->no_hp }}</td>
  46.                                 <td>{{ $dt->alamat }}</td>
  47.                                 <td>{{ date('d F Y H:i:s',strtotime($dt->created_at)) }}</td>
  48.                                 <td>{{ date('d F Y H:i:s',strtotime($dt->updated_at)) }}</td>
  49.                             </tr>
  50.                             @endforeach
  51.                         </tbody>
  52.                     </table>
  53.                 </div>
  54.  
  55.             </div>
  56.         </div>
  57.     </div>
  58. </div>
  59.  
  60. @endsection
  61.  
  62. @section('scripts')
  63.  
  64. <script type="text/javascript">
  65.     $(document).ready(function(){
  66.  
  67.         // btn refresh
  68.         $('.btn-refresh').click(function(e){
  69.             e.preventDefault();
  70.             $('.preloader').fadeIn();
  71.             location.reload();
  72.         })
  73.  
  74.     })
  75. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement