Active deals — {{ now()->format('Y-m-d H:i') }}

@foreach($activeDeals as $deal) @foreach($deal->dealProducts as $dp) @if($loop->first) @endif @php $pt = $dp->profit_type ?? $deal->profit_type; $pv = $dp->profit_value !== null ? (float) $dp->profit_value : (float) $deal->profit_value; @endphp @if($loop->first) @endif @endforeach @endforeach
Deal # Product Profit Cost Sale Compare at Ends at
#{{ $deal->id }}{{ $dp->title }}@if($pt === 'percentage'){{ number_format($pv, 0) }}%@else ${{ number_format($pv, 2) }}@endif ${{ number_format($dp->cost ?? 0, 2) }} ${{ number_format($dp->deal_price ?? 0, 2) }} ${{ $dp->deal_compare_at_price ? number_format($dp->deal_compare_at_price, 2) : '—' }}{{ $deal->ends_at ? $deal->ends_at->format('Y-m-d H:i') : '—' }}