@extends('layouts.backend') @section('title', '| coupons Edit') @section('content')
@if($errors->any())
@foreach ($errors->all() as $error) {{ $error }}
@endforeach
@endif

Edit Coupons

{{ Form::model($coupon, array('route' => array('coupons.update', $coupon->id), 'method' => 'PUT')) }}
{!! Form::label('code', 'Coupon Code') !!} {!! Form::text('code', null, ['class' => 'form-control', 'readonly' => 'readonly']) !!}
{!! Form::label('start_date', 'Start Date') !!} {!! Form::date('start_date', null, ['class' => 'form-control', 'required' => 'required', 'min' => now()->toDateString()]) !!}
{!! Form::label('expiry_date', 'Expiry Date') !!} {!! Form::date('expiry_date', null, ['class' => 'form-control', 'required' => 'required', 'min' => now()->toDateString()]) !!}
{{--
{!! Form::label('user_limit', 'User Limit') !!} (Maximum number of users allowed) {!! Form::number('user_limit', null, ['class' => 'form-control', 'required' => 'required', 'min' => '1']) !!}
--}}
{!! Form::label('user_limit', 'User Limit') !!} (Maximum number of users allowed) {!! Form::select('user_limit_type', ['limited' => 'Limited', 'unlimited' => 'Unlimited'], $coupon->user_limit_type ?? 'limited', ['class' => 'form-control', 'id' => 'user_limit_type']) !!}
{!! Form::number('user_limit', null, ['class' => 'form-control', 'min' => '1', 'id' => 'user_limit', 'required' => 'required', 'placeholder' => 'Enter maximum user limit']) !!}
{!! Form::label('usage_limit', 'Usage Limit') !!} (How many times a single user can use this code) {!! Form::number('usage_limit', null, ['class' => 'form-control', 'required' => 'required', 'min' => '1','readonly' => 'readonly']) !!}
{!! Form::label('discount_amount', 'Discount Amount') !!}
$
{!! Form::number('discount_amount', null, ['class' => 'form-control', 'required' => 'required', 'step' => '0.01', 'readonly' => 'readonly']) !!}
{!! Form::label('status', 'Status') !!} {!! Form::select('status', ['active' => 'Active', 'inactive' => 'Inactive'], null, ['class' => 'form-control']) !!}
{{ Form::submit('Update', array('class' => 'btn btn-primary')) }} {{ Form::close() }}
@stop