@extends('layouts.frontend.app') @push('meta') @endpush @section('title', 'Order List') @section('content')
| Order NO. | Product | Download Remaining | Expires | Download |
|---|---|---|---|---|
| {{$key + 1}} |
|
@php
$total_download = DB::table('download_user_products')
->where('user_id', auth()->id())
->where('product_id', $item->product->id)
->count();
$download_remaining = ($item->product->downloads->count() * $item->product->download_limit) - $total_download;
@endphp
{{$item->product->downloads->count() > 0 ? $download_remaining:0}} | {{date('d/m/Y', strtotime($item->product->download_expire))}} | @foreach ($item->product->downloads as $key => $download) Link {{$key+1}} @endforeach |