<div class="table-responsive">
<table id="copy-print-csv" class="table v-middle">
    <thead>
        <tr>
            <th>Order ID</th>
            <th>Customer Contact</th>
            <th>created at</th>
            <th>Status</th>
            <th>Action</th>
        </tr>
    </thead>
    <tbody>
    @foreach($pending_orders as $pending)
        <tr>
            <td>
                <div class="media-box">
                    <div class="media-box-body">
                        <a href="#" class="text-truncate">{{$pending->invoice_number}}</a>
                    </div>
                </div>
            </td>
            <td>{{$pending->customer_phone}}</td>
            <td>
            <?php 
                $date = \Carbon\Carbon::parse($pending->created_at, 'UTC');
                echo $date->isoFormat('MMMM Do YYYY, h:mma');
                ?>
            </td>
            <td><span class="text-info"><i class="icon-slash"></i> Pending</span></td>
            <td>
            <form id="preview{{$pending->invoice_number}}" action="{{route('PreviewOrder')}}" method="get">
                <input type="text" hidden name="invoice_number" value="{{$pending->invoice_number}}">
            </form>
                <a href="javascript:void(0)" onclick="document.getElementById('preview{{$pending->invoice_number}}').submit();" class="btn btn-outline-info btn-sm rounded-pill">
                    <i class="fa fa-eye"></i>Preview
                </a>
                
                <a href="#" class="btn btn-outline-primary btn-sm rounded-pill" data-toggle="tooltip" data-placement="top" title="" data-original-title="Delete">
                    <i class="icon-x-circle text-danger"></i>Cancel
                </a>
            </td>
        </tr>
        
        @endforeach
    </tbody>
</table>
</div>