{!! Form::label('name', 'Name:') !!} {!! Form::text('name', null, ['class' => 'form-control', 'maxlength' => 255, 'maxlength' => 255, 'maxlength' => 255]) !!}
{!! Form::label('code', 'Code:') !!} @isset($coupons) {!! Form::text('code', null, ['class' => 'form-control', 'disabled'=>'disabled']) !!} @else {!! Form::text('code', mt_rand(1000000000000000,9999999999999999), ['class' => 'form-control bg-light', 'readonly' => 'readonly']) !!} @endisset
{!! Form::hidden('discount_type',1) !!} {{--
{!! Form::label('discount_type', 'Discount Type:') !!} {!! Form::select('discount_type', Common::DiscountType(),null ,['class' => 'select2 form-select ','id'=>'discount_type']) !!}
--}}
{!! Form::label('discount_value', 'Discount Amount:') !!} {!! Form::number('discount_value', null, ['class' => 'form-control','step'=>'any']) !!}
@php if(isset($coupons->start_date)){ $start_date = date('Y-m-d',strtotime($coupons->start_date)); } else{ $start_date = null; } @endphp {!! Form::label('start_date', 'Start Date:') !!} {!! Form::date('start_date',$start_date, ['class' => 'form-control','id'=>'start_date']) !!}
@php if(isset($coupons->end_date)){ $end_date = date('Y-m-d',strtotime($coupons->end_date)); } else{ $end_date = null; } @endphp {!! Form::label('end_date', 'End Date:') !!} {!! Form::date('end_date', $end_date, ['class' => 'form-control','id'=>'end_date']) !!}
{!! Form::hidden('usage_limit',1) !!} {{--
{!! Form::label('usage_limit', 'Usage Limit:') !!} {!! Form::number('usage_limit', null, ['class' => 'form-control']) !!}
{!! Form::label('min_amount', 'Min Amount:') !!} {!! Form::number('min_amount', null, ['class' => 'form-control']) !!}
--}} @isset(auth()->user()->branch_id)
{!! Form::hidden('branch_id', auth()->user()->branch_id) !!}
@else
{!! Form::label('branch_id', 'Branch:') !!} {!! Form::select('branch_id', Common::getBranches(),null ,['class' => 'select2 form-select ','id'=>'branch_id']) !!}
@endisset
status) checked @endisset />