{{ Form::model($user_data, ['route'=>'updateProfile','method' => 'POST','data-toggle'=>"validator" , 'enctype'=> 'multipart/form-data','id' => 'user-form']) }} {{ Form::hidden('username') }} {{ Form::hidden('email') }} {{ Form::hidden('id', null, array('placeholder' => 'id','class' => 'form-control')) }}
{{ Form::label('first_name',__('messages.first_name').' *',['class'=>'form-control-label'], false ) }} {{ Form::text('first_name',old('first_name'),['placeholder' => __('messages.first_name'),'class' =>'form-control','required']) }}
{{ Form::label('last_name',__('messages.last_name').' *',['class'=>'form-control-label'], false ) }} {{ Form::text('last_name',old('last_name'),['placeholder' => __('messages.last_name'),'class' =>'form-control','required']) }}
{{ Form::label('username',__('messages.username').' *',['class'=>'form-control-label'], false ) }} {{ Form::text('username',old('username'),['placeholder' => __('messages.username'),'class' =>'form-control','required']) }}
@if(auth()->user()->hasRole('provider'))
{{ Form::label('designation',__('messages.designation').' *',['class'=>'form-control-label'], false ) }} {{ Form::text('designation',old('designation'),['placeholder' => __('messages.designation'),'class' =>'form-control','required']) }}
@endif
{{ Form::label('country_id', __('messages.select_name',[ 'select' => __('messages.country') ]),['class'=>'form-control-label'],false) }}
{{ Form::select('country_id', [optional($user_data->country)->id => optional($user_data->country)->name], optional($user_data->country)->id, [ 'class' => 'select2js form-group country', 'data-placeholder' => __('messages.select_name',[ 'select' => __('messages.country') ]), 'data-ajax--url' => route('ajax-list', ['type' => 'country']), ]) }}
{{ Form::label('state_id', __('messages.select_name',[ 'select' => __('messages.state') ]),['class'=>'form-control-label'],false) }}
{{ Form::select('state_id', [], [ 'class' => 'select2js form-group state_id', 'data-placeholder' => __('messages.select_name',[ 'select' => __('messages.state') ]), ]) }}
{{ Form::label('city_id', __('messages.select_name',[ 'select' => __('messages.city') ]),['class'=>'form-control-label'],false) }}
{{ Form::select('city_id', [], old('city_id'), [ 'class' => 'select2js form-group city_id', 'data-placeholder' => __('messages.select_name',[ 'select' => __('messages.city') ]), ]) }}
{{ Form::label('email', __('messages.email').' *', ['class' => 'form-control-label'], false) }} {{ Form::email('email', old('email'), ['placeholder' => __('messages.email'), 'class' => 'form-control', 'required', 'pattern' => '[^@]+@[^@]+\.[a-zA-Z]{2,}', 'title' => 'Please enter a valid email address']) }}
{{ Form::label('contact_number', __('messages.contact_number').' *', ['class' => 'form-control-label'], false) }} {{ Form::text('contact_number', old('contact_number'), ['placeholder' => __('messages.contact_number'), 'class' => 'form-control contact_number', 'required']) }}
@if(auth()->user()->hasRole('handyman'))
{{ Form::label('handymantype_id', __('messages.select_name',[ 'select' => __('messages.handymantype') ]).' *',['class'=>'form-control-label'],false) }}
{{ Form::select('handymantype_id', [optional($user_data->handymantype)->id => optional($user_data->handymantype)->name], optional($user_data->handymantype)->id, [ 'class' => 'select2js form-group handymantype', 'required', 'data-placeholder' => __('messages.select_name',[ 'select' => __('messages.handymantype') ]), 'data-ajax--url' => route('ajax-list', ['type' => 'handymantype']), ]) }}
{{ Form::label('name', __('messages.select_name',[ 'select' => __('messages.provider_address') ]),['class'=>'form-control-label'],false) }}
{{ Form::select('service_address_id',[ optional($user_data->handymanAddressMapping)->id => optional($user_data->handymanAddressMapping)->address ],$user_data->service_address_id,[ 'class' => 'select2js form-group service_address_id', 'id' =>'service_address_id', 'data-ajax--url' => route('ajax-list', ['type' => 'provider_address' , 'provider_id' => $user_data->provider_id ]), 'data-placeholder' => __('messages.select_name',[ 'select' => __('messages.provider_address') ]), ]) }}
@endif
{{ Form::label('status',__('messages.status').' *',['class'=>'form-control-label'],false) }} {{ Form::select('status',['1' => __('messages.active') , '0' => __('messages.inactive') ],old('status'),[ 'class' =>'form-control select2js','required']) }}
{{ Form::label('profile_image',__('messages.choose_profile_image'),['class'=>'form-control-label '] ) }}
{{ Form::file('profile_image', ['class'=>"custom-file-input custom-file-input-sm detail" , 'id'=>"profile_image" , 'lang'=>"en" , 'accept'=>"image/*"]) }}
{{ Form::label('address',__('messages.address'), ['class' => 'form-control-label']) }} {{ Form::textarea('address', null, ['class'=>"form-control textarea" , 'rows'=>2 , 'placeholder'=> __('messages.address') ]) }}
@if($user_data->user_type =='provider')

{{ __('messages.why_choose_me') }}

{{ Form::label('title', __('messages.title').'', ['class' => 'form-control-label'], false) }} {{ Form::text('title', old('title'), ['placeholder' => __('messages.title'), 'class' => 'form-control' ]) }}
{{ Form::label('about_description',__('messages.description'), ['class' => 'form-control-label']) }} {{ Form::textarea('about_description', null, ['class'=>"form-control textarea" , 'rows'=>2 , 'placeholder'=> __('messages.description') ]) }}
@if($user_data->reason != null) @foreach($user_data->reason as $reason)
{{ Form::text('reason[]', $reason, ['placeholder' => __('messages.reason'), 'class' => 'form-control']) }}
@endforeach @endif
{{ Form::label('reason', __('messages.reason').'', ['class' => 'form-control-label'], false) }}
{{ Form::text('reason[]', '', ['placeholder' => __('messages.reason'), 'class' => 'form-control' ]) }}
@endif
{{ Form::submit(__('messages.update'), ['class'=>"btn btn-md btn-primary float-md-right"]) }}