@extends('layouts.vendor.app') @section('title',translate('Add new coupon')) @section('content') @php($store_data = \App\CentralLogics\Helpers::get_store_data())
@php($language=\App\Models\BusinessSetting::where('key','language')->first()) @php($language = $language->value ?? null)
@csrf
@if ($language)
@foreach (json_decode($language) as $lang)
@endforeach @else
@endif
{{translate('messages.coupon_list')}}{{$coupons->total()}}
@foreach($coupons as $key=>$coupon) @if ($coupon['discount_type'] == 'percent') @elseif ($coupon['discount_type'] == 'amount') @else @endif @endforeach
{{ translate('messages.sl') }} {{translate('messages.title')}} {{translate('messages.code')}} {{translate('messages.type')}} {{translate('messages.total_uses')}} {{translate('messages.min_trip_amount')}} {{translate('messages.max_discount')}}
{{translate('messages.discount')}}
{{translate('messages.discount_type')}} {{translate('messages.start_date')}} {{translate('messages.expire_date')}} {{translate('messages.status')}} {{translate('messages.action')}}
{{$key+$coupons->firstItem()}} {{Str::limit($coupon['title'],15,'...')}} {{$coupon['code']}} {{translate('messages.'.$coupon->coupon_type)}} {{$coupon->total_uses}}
{{\App\CentralLogics\Helpers::format_currency($coupon['min_purchase'])}}
{{\App\CentralLogics\Helpers::format_currency($coupon['max_discount'])}}
{{$coupon['discount']}}
{{ translate('messages.percent')}}{{ translate('messages.amount')}}{{$coupon['discount_type']}}{{$coupon['start_date']}} {{$coupon['expire_date']}}
@csrf @method('delete')
@if(count($coupons) === 0)
public
{{translate('no_data_found')}}
@endif
{!! $coupons->links() !!}
@endsection @push('script_2') @endpush