@extends('frontend.layouts.user_panel') @section('panel_content')
| # | {{ translate('Product Name')}} | {{ translate('My Bidded Amount')}} | {{ translate('Highest Bid Amount')}} | {{ translate('Auction End Date')}} | {{ translate('Action')}} |
|---|---|---|---|---|---|
| {{ ($key+1) + ($bids->currentPage() - 1)*$bids->perPage() }} | {{ $bid->product->getTranslation('name') }} | {{ single_price($bid->amount) }} | @php $highest_bid = $bid->where('product_id',$bid->product_id)->max('amount'); @endphp {{ single_price($highest_bid) }} | @if($bid->product->auction_end_date < strtotime("now")) {{ translate('Ended') }} @else {{ date('Y-m-d H:i:s', $bid->product->auction_end_date) }} @endif | @php $order = null; $order_detail = \App\Models\OrderDetail::where('product_id',$bid->product_id)->first(); if($order_detail != null ){ $order = \App\Models\Order::where('id',$order_detail->order_id)->where('user_id',Auth::user()->id)->first(); } @endphp @if($bid->product->auction_end_date < strtotime("now") && $bid->amount == $highest_bid && $order == null) @php $carts = \App\Models\Cart::where('user_id', Auth::user()->id)->get(); @endphp @if(count($carts) > 0 ) @php $cart_has_this_product = false; foreach ($carts as $key => $cart){ if($cart->product_id == $bid->product_id){ $cart_has_this_product = true; break; } } @endphp @if($cart_has_this_product) @else @endif @else @endif @elseif($order != null) @else N\A @endif |