@extends('user.layout') @php Config::set('app.timezone', $userBs->timezoneinfo->timezone); @endphp @section('content')
{{ __('Coupons') }}
@if (count($coupons) == 0)

{{ __('NO_COUPON_FOUND') }}

@else
@foreach ($coupons as $coupon) @endforeach
{{ __('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') }}
@csrf
@endif
@endsection