@extends('layouts.admin.master') @section('title', 'Coupon Card') @section('content') Coupon Card Add New Coupon Card Clear Save Coupon Card Info @csrf Coupon Generate Coupon Count * @error('coupon_count') {{ $message }} @enderror Coupon Code Coupon Name * @error('coupon_name') {{ $message }} @enderror Discount Type Amount Percent % Amount Discount * @error('amount_discount') {{ $message }} @enderror Percent Discount * @error('percent_discount') {{ $message }} @enderror Min-Order Amount * @error('min_order_amount') {{ $message }} @enderror Expire Date * @error('expire_date') {{ $message }} @enderror Coupon Card Lists No Coupon Code Coupon Name Discount Type Amount Discount Percent Discount Min-Order Amount Expire Date Expired Used Discontinued Edit Delete @if (count($coupons) != 0) @php $count = 1; @endphp @foreach ($coupons as $coupon) {{ $count }} {{ $coupon['coupon_code'] }} {{ $coupon['coupon_name'] }} {{ $coupon['discount_type'] }} {{ $coupon['amount_discount'] }} {{ $coupon['percent_discount'] }} {{ $coupon['min_order_amount'] }} {{ date('d-M-Y', strtotime($coupon['expire_date'])) }} @php $expireDate = \Carbon\Carbon::parse($coupon['expire_date']); // Replace this with your actual expiry date @endphp @if (\Carbon\Carbon::now()->gt($expireDate)) @else @endif @if ($coupon['is_used'] == 0) @elseif ($coupon['is_used'] == 1) @endif @if ($coupon['is_discontinued'] == 0) @elseif ($coupon['is_discontinued'] == 1) @endif @php $count++; @endphp @endforeach @endif Update Coupon @csrf Coupon Code Coupon Name * Discount Type Amount Percent % Amount Discount * Percent Discount * Min-Order Amount * Expire Date * Discontinued @csrf Are you sure want to delete? @endsection