Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

472
Vistas
Laravel Nova Custom Field - How to save multiple fields to the model

I have been working on updating an old nova package (custom field) that does google maps and google places autocomplete.

I have managed to work out how the custom field goes together, but I'm a bit lost on how to save more than one input box to the model on save.

this is the package: https://github.com/michael-presentcompany/nova-map-address

As you can see I have followed the instructions, but im a bit lost on how to save multiple fields.

fill(formData) {
  formData.append(this.field.attribute, this.value || '');
  formData.append(this.field.latitude, this.field.lat || '');
  formData.append(this.field.longitude, this.field.lng || '');
},

In this case, I want to save the address to one field on the model, and then i want to save lat and long to the model as well. I would like to save them as seperate fields, as this will help me alot with the use case.

I have been following the instructions from here: https://nova.laravel.com/docs/3.0/customization/fields.html#form-fields

Can someone point me in the right direction?? am i missing something simple?

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda