@extends('layouts.admin.master') @section('title', 'Coupon Card') @section('content')
Coupon Card
@csrf
@error('coupon_count')
{{ $message }}
@enderror
@error('coupon_name')
{{ $message }}
@enderror
@error('amount_discount')
{{ $message }}
@enderror
@error('percent_discount')
{{ $message }}
@enderror
@error('min_order_amount')
{{ $message }}
@enderror
@error('expire_date')
{{ $message }}
@enderror
@if (count($coupons) != 0) @php $count = 1; @endphp @foreach ($coupons as $coupon) @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
No Coupon Code Coupon Name Discount Type Amount Discount Percent Discount Min-Order Amount Expire Date Expired Used Discontinued Edit Delete
{{ $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'])) }}
@endsection