@extends('Layout.base', ['title'=>'AFRICA | List Products'])
@section('content')

          <div class="col-12">
              <div class="card-body">
            <div class="card">

              <div class="card-header" style="text-align: right;">
      <a href="{{route('Products.create')}}"><button type="button" class="btn btn-primary">Add new product</button></a>
              </div>
              <!-- /.card-header -->
              <div class="card-body">
                <table id="example1" class="table table-bordered table-striped">
                  <thead>
                  <tr>
                    <th>Label</th>
                    <th>Code</th>
                    <th>Quantity</th>
                    <th>Created at</th>
                    <th>Action</th>
                  </tr>
                  </thead>
                  <tbody>
                    @foreach($Products as $Product)
                  <tr>
                    <td>{{$Product->label}}</td>
                    <td>{!! DNS1D::getBarcodeHTML($Product->code, 'C128A') !!}</td>
                    <td>{{$Product->quantity}}</td>
                    <td>{{$Product->created_at}}</td>
                    <td>
                      <a href="{{route('Products.show',$Product->id )}}"><img src="{{url('icons/png/eye-2x.png')}}"></a>
                      <a href="{{route('Products.create')}}"><img src="{{url('icons/png/pencil-2x.png')}}"></a>
                      <a href="{{route('Products.create')}}"><img src="{{url('icons/png/trash-2x.png')}}"></a>
                    </td>
                  </tr>
                  @endforeach
                  </tbody>
                </table>
              </div>
              <!-- /.card-body -->
            </div>
            <!-- /.card -->
          </div>
          <!-- /.col -->

          @stop