Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

180
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!