<div class="col-md-8 mt-xs-5">
    <h2 class="h4 p-3 bg-dark text-white">
        My Rental Orders List
    </h2>
    <div class="card bigbox-hvr-slow mt-4">
        <div class="card-body">
          <div class="table-responsive">

                    <table class="table table-striped table-bordered" id="article_table">
                        <thead>
                            <tr>
                                <th>Order ID</th>
                                <th>Article Details</th>
                                <th>User Name</th>
                                <th>Duration</th>
                                <th width="100">Created</th>
                                <th width="120">Payment Status</th>
                                <th width="120">Access Status</th>
                            </tr>
                        </thead>
                        <tbody>
                            @if (!empty($rental_order))
                            @foreach($rental_order as $key => $value)
                            <tr>
                                <td>{{ $value->rental_order_id }}</td>
                                <td>
                                    @php 
                                    $param=encrypt(array('readrentalpdf',$value->article_id,config('constants.admin.token')));
                                    @endphp
                                    <a href="{{route('article', ['article_id' => $value->article_id,'param' => $param])}}" title="Article: {!! $value->article !!}" class="btn btn-outline-dark btn-sm">View</a>
                                </td>
                                <td>{{ $value->name }}</td>
                                <td>{{ $value->rental_hours }} hrs.</td>
                                <td>{{ strftime('%Y-%m-%d',$value->created_on) }}</td>
                                <td>
                                    @if($value->order_status == "C") Completed @endif
                                    @if($value->order_status == "F") Fail @endif
                                    @if($value->order_status == "I") In-Process @endif
                                    @if($value->order_status == "N") Not Completed @endif
                                </td>
                                <td>
                                    {{ $value->rental_status }}                                
                                </td>
                            </tr>
                            @endforeach
                            @else
                            <tr>
                                <td colspan="7">
                                    <center>Empty</center>
                                </td>
                            </tr>
                            @endif
                        </tbody>
                    </table>
                    @if (!empty($rental_order))
                    <center>{{ $rental_order->appends(request()->input())->links() }}</center>
                    @endif
        </div>
      </div>
    </div>
</div>

