Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

473
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda