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

191
Visualizações
How can I pass data with route in ajax url while using resource route and controller?

I have a problem with ajax url.

The problem is I am using the **resource route and resource controller ** and am trying to update data using modal. I have successfully fetched data into modal by passing route to the anchor tag like this - <a href="{{ route('productedit.edit', $item->id) }}" class="btn edit_button btn-sm btn primary" data-bs-toggle="modal" data-bs-target="#exampleModal">edit</a>

in ajax let url = $(this).attr("href")

Now I need to submit the form but I am stuck in the ajax URL where I need to put route name {{productedit.update}} because of using the resource route I need to pass the id with it. How can I do this?

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