@extends('admin.layout') @section('content')
Name | Code | Discount | Status | Created | Actions |
---|---|---|---|---|---|
{{ $coupon->name }} | {{ $coupon->code }} | {{ $coupon->type == 'fixed' && $be->base_currency_symbol_position == 'left' ? $be->base_currency_symbol : '' }}{{ $coupon->value }}{{ $coupon->type == 'percentage' ? '%' : '' }}{{ $coupon->type == 'fixed' && $be->base_currency_symbol_position == 'right' ? $be->base_currency_symbol : '' }} |
@php
$end = Carbon\Carbon::parse($coupon->end_date);
$start = Carbon\Carbon::parse($coupon->start_date);
$now = Carbon\Carbon::now();
$diff = $end->diffInDays($now);
@endphp
@if ($start->greaterThan($now))
Pending@else @if ($now->lessThan($end))Active@elseExpired@endif @endif |
@php $created = Carbon\Carbon::parse($coupon->created_at); $diff = $created->diffInDays($now); @endphp {{ $created->subDays($diff)->diffForHumans() }} | Edit |