Current File : /home/tradevaly/www/resources/views/user/pages/product/view_history.blade.php
@extends('user.ayaan.master')
@push('title','holesale Suppliers, Manufacturers & China Traders and Exporters Premium Directory')
@push('style')
    <link href="{{ asset('/assets/libs/datatables/datatables.min.css') }}" rel="stylesheet" type="text/css" />
@endpush

@section('content')
<div class="container-fluid">
  <div class="row">
    <div class="col-md-12">
      <div class="card">
        <div class="card-header card-header-info card-header-icon">
          <h4 class="card-title">My Product Visitors</h4>
        </div>
        <div class="card-body">
          <div class="table-responsive">
           <table class="table dat_table">
              <thead>
                <tr>
                  <th class="text-center">#</th>
                  <th>Image</th>
                  <th>Title</th>
                  <th>Viewer Email</th>
                  <th>Total View</th>
                  <th>Visitor</th>
                  <th>Time</th>
                  <th>Analytics </th>
                </tr>
              </thead>
              <tbody>
                
              </tbody>
            </table>
            
          </div>
        </div>
      </div>
  </div>
</div>
</div>
@stop
@section('script')
    <script src="{{ asset('/assets/libs/datatables/datatables.min.js') }}"></script>
    <script src="{{ asset('/assets/libs/jszip/jszip.min.js') }}"></script>
    <script src="{{ asset('/assets/libs/pdfmake/pdfmake.min.js') }}"></script>
    <script>
    $(function () {
        $(document).ready(function () {
            let url =  "{{ route('user.viewHistory') }}";
            var table = $('.dat_table').DataTable({
            lengthChange: false,
            processing: true,
            serverSide: true,
            ajax: url,
            dom: 'Bfrtip',
            columns: [
                {data: 'DT_RowIndex', name: 'DT_RowIndex'},
                {data: 'image', name: 'image'},
                {data: 'title', name: 'title'},
                {data: 'email', name: 'email'},
                {data: 'total_view', name: 'total_view'},
                {data: 'visitor', name: 'visitor'},
                {data: 'time', name: 'time'},
                {data: 'action', name: 'action'},
                ],
            buttons: ['copy', 'excel', 'pdf', 'colvis']
            });
            table.buttons().container().appendTo('#datatable-buttons_wrapper .col-md-6:eq(0)');
          $(".dataTables_length select").addClass('form-select form-select-sm');
            
        });
    });
</script>
@endsection