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

188
Vistas
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 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