Current File : /home/tradevaly/www/resources/views/user/pages/product/oldanalytics.blade.php
@extends('backend.ayaan.master')
@push('title','holesale Suppliers, Manufacturers & China Traders and Exporters Premium Directory')
@push('style')
    
@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">
            <img style="width:100px; border-radius:10%;" src="{{asset('storage/images/admin/product/'.$product->image)}}" alt="image">
            <h4 class="card-title">{{$product->title}} analytics</h4>
        </div>
        <div class="card-body">
          <div class="table-responsive">
                <!--<a class="btn btn-success text-end" href="{{url('user/products/add')}}">ADD NEW</a>-->
            <table class="table">
              <thead>
                <tr>
                  <th class="text-center">#</th>
                  <th>Vesitor Name</th>
                  <th>Viewer Email</th>
                  <th>Viewer phone number</th>
                  <th>Company name</th>
                  <th>Time</th>
                  <th>Inquery</th>
                </tr>
              </thead>
              <tbody>
                @foreach ($watch_histories as $history)
                 
                <tr>
                    <td class="text-center">
                        {{ ++$serialNumber }}
                    </td>
                    <td>
                        @if($history->product)
                        <!--<a href="{{ route('product.view',$history->product->slug) }}" target="_blank">{{$history->product->title}}</a>-->
                        @endif
                        @if($history->visitor)
                        {{$history->visitor->name}}</td>
                        @endif
                    </td>
                    <td>
                        @if($history->visitor)
                        {{$history->visitor->email}}
                        @endif
                    </td>
                    <td>
                        @if($history->visitor)
                        {{$history->visitor->phone}}</td>
                        @endif
                    </td>
                    <td>
                        @if($history->visitor)
                        {{$history->visitor->company->name}}</td>
                        @endif
                    </td>
                    <td>
                        @if($history->visitor)
                        {{($history->created_at)->diffForHumans()}}
                        @endif
                    </td>
                    <td>
                        <a class="btn btn-success" target="_blank" href="{{route('product.inquery',$history->product->slug)}}">Inquery</a>
                    </td>
                </tr>
                @endforeach
              </tbody>
            </table>
            {{ $watch_histories->links() }}
          </div>
        </div>
      </div>
  </div>
</div>
</div>
@stop