@extends('backEnd.layouts.master') @section('title', 'Manage Coupons') @section('css') @endsection @section('content')
{{-- PAGE HEADER --}}

Manage Coupons

Create and manage discount codes for customers.

Create Coupon
@forelse($coupons as $key => $coupon) {{-- Code --}} {{-- Type --}} {{-- Value --}} {{-- Min Purchase --}} {{-- Validity --}} {{-- Status --}} {{-- Actions --}} @empty @endforelse
# Coupon Code Discount Type Value Min Purchase Validity Period Status Actions
{{ $key + 1 }} {{ $coupon->code }} @if(in_array($coupon->type, ['flat', 'fixed']))
Fixed Amount
@else
Percentage
@endif
@if(in_array($coupon->type, ['percent', 'percentage'])) {{ $coupon->value }}% @else ৳{{ number_format($coupon->value, 2) }} @endif {{ $coupon->min_purchase ? '৳'.number_format($coupon->min_purchase) : 'No Limit' }}
{{ $coupon->valid_from ?? 'Anytime' }} {{ $coupon->valid_to ?? 'Lifetime' }}
@php $isExpired = $coupon->valid_to && \Carbon\Carbon::parse($coupon->valid_to)->isPast(); @endphp @if($isExpired) Expired @elseif($coupon->status) Active @else Inactive @endif
@csrf @method('DELETE')

No Coupons Found

Create a new coupon to get started.
{{-- Pagination (If passed) --}} @if(method_exists($coupons, 'links'))
{{ $coupons->links('pagination::bootstrap-4') }}
@endif
@endsection @push('scripts') {{-- Ensure FontAwesome is loaded for icons inside table if Feather is not enough --}} @endpush