@php
if($voucherDetails->redemptionVoucher->image && Storage::disk('public')->exists('voucher-image/'.$voucherDetails->redemptionVoucher->image)){
$featuredImage = asset('storage/voucher-image/'.$voucherDetails->redemptionVoucher->image);
}else{
$featuredImage = asset('front/image/default-voucher-image.jpg');
}
$validity_dates = explode('-',$voucherDetails->redemptionVoucher->validity);
$status = '';
if($voucherDetails->redemptionVoucher->type != 1){
if($voucherDetails->is_used == 1){
$status = 'Used';
}else if(!is_null($voucherDetails->expiry_date) && $voucherDetails->expiry_date < date('Y-m-d')){ //13-06-2024
$status = 'Expired';
}
}
@endphp
@if($voucherDetails->redemptionVoucher->type!=1)
{{ $voucherDetails->redemptionVoucher->title ?? "" }}
Redeemed with : {{ $voucherDetails->points ?? "0" }} {{ config('constants.points_name') }}
Valid until : {{ ($voucherDetails->expiry_date) ? date('d M Y',strtotime($voucherDetails->expiry_date )) : date('d M Y',strtotime($voucherDetails->redemptionVoucher->to_date)) }}
{{-- Valid until : {{ ($voucherDetails->redemptionVoucher->to_date) ? date('d M Y',strtotime($voucherDetails->redemptionVoucher->to_date )) : date('d M Y',strtotime($voucherDetails->expiry_date)) }} --}}
@if($status != "Expired")
@if($voucherDetails->redemptionVoucher->type==0)
@else
@endif
@if($voucherDetails->is_used)
Code Used
@else
Copy Code
@endif
@endif
@if($voucherDetails->is_used)
You have used this code
@elseif($status == "Expired")
This voucher has been expired
@else
Paste this code at the checkout page
@endif
@else
{{ $voucherDetails->redemptionVoucher->title ?? "" }}
{{--
{{ date('d-M-Y') }}
--}}
Redeem Successfully
Redeemed with {{ $voucherDetails->redemptionVoucher->points_to_pay ?? "0" }} {{ config('constants.points_name') }}
@endif
@if($voucherDetails->redemptionVoucher->type==0 && $voucherDetails->expiry_date>=date('Y-m-d'))
Use now
@endif