@extends('layout') @push('styles') @endpush @section('content') @if (session('success'))
×

Success!

{{ session('success') }}

@endif

Promotion Codes

Overview

{{-- Tabs / Filters (All | Published | Postponed | Draft | Paused | Completed | Cancelled) --}}
@php $baseQuery = request()->except(['page', 'status']); $status = request('status', 'all'); @endphp
{{-- Filters Row (search, sort, date) --}}
{{-- Keep status when changing other filters --}} {{-- Search --}} {{-- Sort --}} {{-- Direction --}} {{-- Date (start_date) --}} {{-- Buttons (INLINE on Desktop, WRAP on Mobile) --}}
Reset
{{-- Table --}}
@forelse($promos as $promo) @php $percentage = ($promo->used_count / $promo->total_limit) * 100; @endphp @php $revenue = $promo->used_count * $promo->discount_value; @endphp @empty @endforelse
Code Type Discount Usage Valid Until Revenue Status Applicable To
{{ $promo->name ?? '' }}
{{ $promo->discount_type ?? '' }} {{ $promo->discount_value ?? '' }} @if ($promo->discount_type === 'Percentage') % @else {{ getSetting('default_currency') === 'USD' ? '$' : getSetting('default_currency') ?? '' }} @endif
{{ $promo->used_count }}/{{ $promo->total_limit }}
{{ optional($promo->valid_to) ? \Carbon\Carbon::parse($promo->valid_to)->format('M d, Y') : '—' }} {{ $revenue }} {{ getSetting('default_currency') === 'USD' ? '$' : getSetting('default_currency') ?? '' }} @if ( ($promo->valid_to && \Carbon\Carbon::parse($promo->valid_to)->isPast()) || $promo->used_count >= $promo->total_limit) Expired @elseif ($promo->status) Active @else Inactive @endif @if (($promo->applicability ?? '') == 'Specific Events') @php $events = $promo->events->pluck('title')->take(1)->toArray(); @endphp {{ implode(', ', $events) }} @if ($promo->events->count() > 1) ... @endif @else {{ $promo->applicability ?? '' }} @endif
{{-- Action Trigger --}} {{-- Dropdown Menu --}}
icon Edit
@csrf @method('DELETE')

Are you sure?

This action cannot be undone.

No Promotion Codes found.
{{-- Items per page dropdown --}}
@foreach (request()->except('per_page') as $key => $value) @endforeach
{{-- Pagination Display --}}

Page {{ $promos->currentPage() }} of {{ $promos->lastPage() }}

{{-- Previous --}} @if ($promos->onFirstPage()) @else icon @endif {{-- Next --}} @if ($promos->currentPage() == $promos->lastPage()) @else icon @endif
{{-- Optional small script: press Enter in search to submit --}} @endsection