@extends('layouts.master') @section('title',__('Edit Coupon')) @section('breadcum') @endsection @section('maincontent')
@if ($errors->any()) @endif
{{ __('Back') }}
{{__('Edit Coupon')}}
{!! Form::model($coupon, ['method' => 'PATCH', 'action' => ['CouponController@update', $coupon->id]]) !!}
{!! Form::label('coupon_code', __('CouponCode')) !!} {!! Form::text('coupon_code', null, ['class' => 'form-control', 'required' => 'required', 'placeholder' => __('Please Enter Unique Coupon Code') ,'pattern'=>'[A-Za-z0-9]+','title'=>__('Please Do Not Use')]) !!} {{ $errors->first('coupon_code') }}
@if(isset($config->stripe_payment) && $config->stripe_payment == '1') @if(env('STRIPE_KEY') != NULL && env('STRIPE_SECRET') != NULL)
{{__('Use For Stripe')}} ?
{{ $errors->first('in_stripe') }}

@endif @endif
{{__('Amount Off Or Percent')}} (%) {{__('Off')}}
{!! Form::checkbox('percent_check', 1, $coupon->percent_off != NULL ? 1 : 0, ['class' => 'bootswitch', "data-on-text"=>__('PercentOff'), "data-off-text"=>__('AmountOff'), "data-size"=>"small"]) !!}
{{ $errors->first('percent_check') }}
{{ $errors->first('amount') }}
{!! Form::hidden('currency', $currency_code) !!}
{!! Form::label('duration',__('Duration')) !!} {!! Form::select('duration', ['once'=>__('Once'), 'repeating' =>__('Repeating'), 'forever' => __('Forever')], null, ['class' => 'form-control select2', 'required' => 'required']) !!} {{ $errors->first('duration') }}
{!! Form::label('duration_in_months', __('Duration In Months')) !!} {!! Form::number('duration_in_months', null, ['class' => 'form-control', 'min' => 0]) !!} {{ $errors->first('duration_in_months') }}
{!! Form::label('max_redemptions', __('Max Redemptions')) !!} {!! Form::number('max_redemptions', null, ['class' => 'form-control', 'min' => 0, 'required' => 'required']) !!} {{ $errors->first('max_redemptions') }}
{!! Form::label('redeem_by',__('Redeem By')) !!} {!! Form::date('redeem_by', $coupon->redeem_by, ['class' => 'form-control', 'placeholder' => '']) !!} {{ $errors->first('redeem_by') }}
{!! Form::close() !!}
@endsection @section('script') @endsection