Editar de Usuario Externo u Empresa

@if($uexterno->tipo == 1)
{{ Form::open(array('id' => 'form-tipo','route' => 'usuarioexterno.editar')) }}
{!! Form::hidden('invisible', $uexterno->id, array('id' => 'invi')) !!}
{!! Form::text('nombres', $uexterno->nombres, array('class' => 'form-control', 'onkeypress' => 'return isTextKey(event)','onpaste' => 'return false' , 'required' => 'required','id' => 'iNbs','pattern' => '(.|\s)*\S(.|\s)*','tabindex' => 1)) !!}
{{ Form::hidden('type', 1) }}
{!! Form::text('dni', $uexterno->dni, array('class' => 'form-control' ,"maxlength" => "8",'pattern' => '(.|\s)*\S(.|\s)*', 'onkeypress' => 'return isNumberKey(event)','onpaste' => 'return false','required' => 'required','id' => 'iDni','tabindex' => 2)) !!}
{!! Form::text('apellidop', $uexterno->apellido_paterno, array('class' => 'form-control', 'onkeypress' => 'return isTextKey(event)','pattern' => '(.|\s)*\S(.|\s)*','onpaste' => 'return false' , 'required' => 'required','id' => 'iApp','tabindex' => 3)) !!}
{!! Form::text('apellidom', $uexterno->apellido_materno, array('class' => 'form-control', 'onkeypress' => 'return isTextKey(event)','pattern' => '(.|\s)*\S(.|\s)*','onpaste' => 'return false' , 'required' => 'required','id' => 'iApm','tabindex' => 4)) !!}
{!! Form::label('fech_ingr', 'Fecha de nacimiento:', ['class' => 'control-label']) !!}
{!! Form::text('fecha_nacio', \Carbon\Carbon::parse($uexterno->fecha_nacimiento,'America/Lima')->format('d-m-Y'), array('class' => 'form-control','id' => 'iNac','tabindex' => 5)) !!}
{!! Form::text('telefono', $uexterno->telefono, array('class' => 'form-control',"maxlength" => "9", 'onkeypress' => 'return isNumberKey(event)','onpaste' => 'return false','tabindex' => 6)) !!}
{!! Form::text('correo', $uexterno->correo, array('class' => 'form-control','pattern' => '[^ @]*@[^ @]*','tabindex' => 7)) !!}
{!! Form::text('celular', $uexterno->celular, array('class' => 'form-control',"maxlength" => "9", 'onkeypress' => 'return isNumberKey(event)','onpaste' => 'return false','tabindex' => 8)) !!}
{!! Form::text('especialidad', $uexterno->especialidad, array('class' => 'form-control','pattern' => '(.|\s)*\S(.|\s)*', 'onkeypress' => 'return isTextKey(event)','onpaste' => 'return false','tabindex' => 9)) !!}
{!! Form::text('cargo', $uexterno->cargo, array('class' => 'form-control','pattern' => '(.|\s)*\S(.|\s)*', 'onkeypress' => 'return isTextKey(event)','onpaste' => 'return false','tabindex' => 10)) !!}
{!! Form::close() !!}
@endif @if($uexterno->tipo == 2)
{{ Form::open(array('id' => 'form-tipo-empresa','route' => 'usuarioexterno.editar')) }}
{!! Form::hidden('invisible', $uexterno->id, array('id' => 'invi')) !!}
{!! Form::text('ruc', $uexterno->ruc, array('class' => 'form-control',"maxlength" => "11", "minlength" => "11", 'onkeypress' => 'return isNumberKey(event)','onpaste' => 'return false','tabindex' => 1)) !!}
{{ Form::hidden('type', 2) }}
{!! Form::text('razon_social', $uexterno->razon_social, array('class' => 'form-control','pattern' => '(.|\s)*\S(.|\s)*', 'onkeypress' => 'return isTextKey(event)','onpaste' => 'return false' , 'required' => 'required','placeholder' => 'Razón social - Nombre comercial','tabindex' => 2)) !!}
{!! Form::text('direccion', $uexterno->direccion, array('class' => 'form-control','pattern' => '(.|\s)*\S(.|\s)*','onpaste' => 'return false','tabindex' => 3)) !!}
{!! Form::text('correo', $uexterno->correo, array('class' => 'form-control','pattern' => '[^ @]*@[^ @]*','tabindex' => 4)) !!}
{!! Form::text('contacto', $uexterno->contacto, array('class' => 'form-control','pattern' => '(.|\s)*\S(.|\s)*','onpaste' => 'return false','tabindex' => 5)) !!}
{!! Form::text('representante', $uexterno->representante, array('class' => 'form-control','pattern' => '(.|\s)*\S(.|\s)*','onpaste' => 'return false','tabindex' => 6)) !!}
{!! Form::text('ncomercial', $uexterno->ncomercial, array('class' => 'form-control','pattern' => '(.|\s)*\S(.|\s)*','onpaste' => 'return false','tabindex' => 7)) !!}
{!! Form::text('telefono', $uexterno->telefono, array('class' => 'form-control',"maxlength" => "9", 'onkeypress' => 'return isNumberKey(event)','onpaste' => 'return false','tabindex' => 8)) !!}
{!! Form::close() !!}
@endif