@extends('layouts.admin') @section('title', __('Coupons')) @section('content')

{{ __('Coupons') }}

{{ __('New coupon') }}
@if ($coupons)
@foreach ($coupons as $c) @endforeach
{{ __('Code') }}{{ __('Discount') }}{{ __('Used') }}{{ __('Active') }}
{{ $c->code }}{{ $c->description }} {{ match ($c->discount_type) { 'percent' => rtrim(rtrim($c->discount_value, '0'), '.') . '%', 'fixed' => '$' . number_format((float) $c->discount_value, 2), default => __('Free delivery') } }} {{ $c->used_count }}{{ $c->usage_limit ? ' / ' . $c->usage_limit : '' }}{{ $c->is_active ? __('Yes') : __('No') }} {{ __('Edit') }}
@include('partials.pagination', ['result' => $result]) @else {{ __('Create one') }} @endif @endsection