@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')}}@else{{__('Expired')}}@endif @endif |
@php $created = Carbon\Carbon::parse($coupon->created_at); $diff = $created->diffInDays($now); @endphp {{ $created->subDays($diff)->diffForHumans() }} | {{__('Edit')}} |