@extends('layouts.app') @section('content')

{{ __('Promo Codes') }}

@hasPermission('admin.coupon.create') {{__('Create New')}} @endhasPermission
@hasPermission('admin.coupon.toggle') @endhasPermission @foreach ($coupons as $coupon) @hasPermission('admin.coupon.toggle') @endhasPermission @endforeach
{{ __('Code') }} {{ __('Discount') }} {{ __('Min Amount') }} {{ __('Started At') }} {{ __('Expired At') }}{{ __('Status') }}{{ __('Action') }}
{{ $coupon->code }} {!! $coupon->type->value == 'Amount' ? showCurrency($coupon->discount) : $coupon->discount . '%' !!} {{ showCurrency($coupon->min_amount) }} {{ Carbon\Carbon::parse($coupon->started_at)->format('M d, Y h:i a') }} {{ Carbon\Carbon::parse($coupon->expired_at)->format('M d, Y h:i a') }} @hasPermission('admin.coupon.edit') @endhasPermission @hasPermission('admin.coupon.destroy') @endhasPermission
{{ $coupons->links() }}
@endsection