@if($deals->isEmpty())

No deals yet.

@else
@foreach($deals as $deal) @php $first = $deal->dealProducts->first(); $isFinished = $deal->restored || ($deal->ends_at && $deal->ends_at->isPast()); @endphp @endforeach
Deal # Image Product Starts Ends Status Actions
#{{ $deal->id }} @if($first && $first->image_url) @else @endif @if($first) {{ $first->title }} @if($deal->dealProducts->count() > 1)
+{{ $deal->dealProducts->count() - 1 }} more @endif @else — @endif
{{ $deal->starts_at ? $deal->starts_at->copy()->timezone(config('app.deals_display_timezone', 'America/New_York'))->format('m/d/Y g:i A') : '—' }} {{ $deal->ends_at ? $deal->ends_at->copy()->timezone(config('app.deals_display_timezone', 'America/New_York'))->format('m/d/Y g:i A') : '—' }} @if($isFinished) Finished @else Running @endif @if(!$isFinished && Route::has('deals.edit')) Edit
@csrf @method('DELETE')
@else @endif
{{ $deals->links('vendor.pagination.simple-default') }} @endif