{{ Form::open(['route' => ['users.update', $user->id], 'method' => 'patch', 'enctype'=> 'multipart/form-data']) }}
{{ Form::label('company_id', 'Company') }}*
{{ Form::select('company_id', $companies, old('company_id') ? old('company_id') : $user->company_id, [
'class' => "form-control select2-input company_id",
'id' => "company_id",
'data-live-search'=>'true'
]) }}
@if($errors->has('company_id'))
{{ $errors->first('company_id') }}
@endif
{{ Form::label('role_id', 'Role') }}*
{{ Form::select('role_id', $roles, old('role_id') ? old('role_id') : $user->role_id, [
'class' => "form-control select2-input role_id",
'id' => "role_id",
'data-live-search'=>'true'
]) }}
@if($errors->has('role_id'))
{{ $errors->first('role_id') }}
@endif
{{ Form::label('full_name', 'Full name') }}*
{{ Form::text('full_name', old('full_name') ? old('full_name') : $user->full_name, [
'class' => "form-control full_name",
'id' => "full_name",
]) }}
@if($errors->has('full_name'))
{{ $errors->first('full_name') }}
@endif
{{ Form::label('email', 'Email') }}*
{{ Form::text('email', old('email') ? old('email') : $user->email, [
'class' => "form-control email",
'id' => "email",
]) }}
@if($errors->has('email'))
{{ $errors->first('email') }}
@endif
{{ Form::label('address_line1', 'Address line1') }}
{{ Form::text('address_line1', old('address_line1') ? old('address_line1') : $user->address_line1, [
'class' => "form-control address_line1",
'id' => "address_line1",
]) }}
@if($errors->has('address_line1'))
{{ $errors->first('address_line1') }}
@endif
{{ Form::label('address_line2', 'Address line2') }}
{{ Form::text('address_line2', old('address_line2') ? old('address_line2') : $user->address_line2, [
'class' => "form-control address_line2",
'id' => "address_line2",
]) }}
@if($errors->has('address_line2'))
{{ $errors->first('address_line2') }}
@endif
{{ Form::label('phone', 'Phone') }}*
{{ Form::text('phone', old('phone') ? old('phone') : $user->phone, [
'class' => "form-control phone",
'id' => "phone",
]) }}
@if($errors->has('phone'))
{{ $errors->first('phone') }}
@endif
{{ Form::label('fax', 'Fax') }}
{{ Form::text('fax', old('fax') ? old('fax') : $user->fax, [
'class' => "form-control fax",
'id' => "fax",
]) }}
@if($errors->has('fax'))
{{ $errors->first('fax') }}
@endif
{{ Form::label('suburb', 'Town') }}
{{ Form::text('suburb', old('suburb') ? old('suburb') : $user->suburb, [
'class' => "form-control suburb",
'id' => "suburb",
]) }}
@if($errors->has('suburb'))
{{ $errors->first('suburb') }}
@endif
{{ Form::label('postcode', 'Post code') }}
{{ Form::text('postcode', old('postcode') ? old('postcode') : $user->postcode, [
'class' => "form-control postcode",
'id' => "postcode",
]) }}
@if($errors->has('postcode'))
{{ $errors->first('postcode') }}
@endif
{{ Form::label('status', 'Status') }}
{{ Form::select('status', [1=> 'Active', 0=> 'In-active'], old('status') ? old('status') : $user->status, [
'class' => "form-control status",
'id' => "status",
]) }}
@if($errors->has('status'))
{{ $errors->first('status') }}
@endif
{{ Form::label('file', 'Avatar') }}
{{ Form::file('file', [
'class' => "form-control file",
'id' => "file",
]) }}
@if($errors->has('file'))
{{ $errors->first('file') }}
@endif
{{ Form::label('rate', 'Rate') }}*
{{ Form::text('rate', old('full_name') ? old('rate') : $user->rate, [
'class' => "form-control rate",
'id' => "rate",
]) }}
@if($errors->has('rate'))
{{ $errors->first('rate') }}
@endif
{{ Form::close() }}
@stop