@if(isset($customer))
{{ Form::model($customer, ['route' => ['backend.customer.update',$customer->id], 'method' => 'patch','class'=>'form-horizontal form-material','data-parsley-validate'=>'','autocomplete'=>'off','enctype'=>'multipart/form-data','id'=>'customerForm']) }}
@else
{{ Form::open(['route' => 'backend.customer.store','class'=>'form-horizontal form-material','data-parsley-validate'=>'','method'=>'POST','autocomplete'=>'off','enctype'=>'multipart/form-data','id'=>'customerForm']) }}
@endif
Customer Details
Details of Customer
{{ Form::text('name',Input::old('name'),['class'=>'form-control','data-parsley-required'=>'true','autofocus'=>'true']) }}
@if(isset($errors) && $errors->first('name'))
{{ $errors->first('name') }}
@endif
{{ Form::email('email',Input::old('email'),['class'=>'form-control','data-parsley-required'=>'true','id'=>'email','data-parsley-type'=>'email']) }}
@if(isset($errors) && $errors->first('email'))
{{ $errors->first('email') }}
@endif
{{ Form::text('phone',Input::old('phone'),['class'=>'form-control','data-parsley-required'=>'true','id'=>'phone','data-parsley-type'=>'digits','data-parsley-minlength'=>'10','data-parsley-maxlength'=>'15']) }}
@if(isset($errors) && $errors->first('phone'))
{{ $errors->first('phone') }}
@endif
@php
$attributes = ['class'=>'form-control','id'=>'password'];
@endphp
@if(!isset($customer))
@php
$attributes['data-parsley-required'] = 'true';
@endphp
@endif
{{ Form::password('password',$attributes) }}
@php
$attributes = ['class'=>'form-control','id'=>'confirm_password','data-parsley-equalto'=>'#password'];
@endphp
@if(!isset($customer))
@php
$attributes['data-parsley-required'] = 'true';
@endphp
@endif
{{ Form::password('confirm_password',$attributes) }}
@if(isset($customer))
@php
$selectedCountry = $customer->UserContact->country_id;
@endphp
@else
@php
$selectedCountry = null;
@endphp
@endif
{{ Form::select('country',$countries,$selectedCountry,['class'=>'form-control','data-parsley-required'=>'true','id'=>'OriginCountry']) }}
@if(isset($errors) && $errors->first('country'))
{{ $errors->first('country') }}
@endif
@if(isset($customer))
@php
$selectedState = $customer->UserContact->state_id;
@endphp
{{ Form::select('state',$state,$selectedState,['class'=>'form-control','data-parsley-required'=>'true','id'=>'state']) }}
@else
@php
$selectedState = null;
@endphp
{{ Form::select('state',[],null,['class'=>'form-control','data-parsley-required'=>'true','id'=>'state']) }}
@endif
@if(isset($errors) && $errors->first('state'))
{{ $errors->first('state') }}
@endif
@if(isset($customer))
@php
$selectedCity = $customer->UserContact->city_id;
@endphp
{{ Form::select('city',$city,$selectedCity,['class'=>'form-control','data-parsley-required'=>'true','id'=>'city']) }}
@else
@php
$selectedCity = null;
@endphp
{{ Form::select('city',[],$selectedCity,['class'=>'form-control','data-parsley-required'=>'true','id'=>'city']) }}
@endif
@if(isset($errors) && $errors->first('city'))
{{ $errors->first('city') }}
@endif
Status
{{ Form::checkbox('status', (isset($customer->status)) ? $customer->status : 0, null,['class'=>'form-control', 'data-on-color'=>'info','data-off-color'=>'danger', 'id'=>'status']) }}
Credit Status
{{ Form::checkbox('credit_status', (isset($customer->credit_status)) ? $customer->credit_status : 1, null,['class'=>'form-control', 'data-on-color'=>'info','data-off-color'=>'danger','id'=>'credit_status']) }}
{{ Form::text('account_name',Input::old('account_name'),['class'=>'form-control','id'=>'account_name']) }}
@if(isset($errors) && $errors->first('account_name'))
{{ $errors->first('account_name') }}
@endif
{{ Form::text('account_number',Input::old('account_number'),['class'=>'form-control','id'=>'account_number']) }}
@if(isset($errors) && $errors->first('account_number'))
{{ $errors->first('account_number') }}
@endif
{{ Form::number('discount_value', Input::old('discount_value'), ['class' => 'form-control','autofocus' => 'true','min' => 0,'max' => 100,'step' => '0.01']) }}
@if(isset($errors) && $errors->first('discount_value'))
{{ $errors->first('discount_value') }}
@endif
{{ Form::close() }}