You can send extra data to a put method without any problem. Can you show the code for your ajax request?
Aug 12, 2022
8
Level 1
How to pass laravel variable to ajax post in update method ?
I'm trying to use update method with ajax, but unfortunately i couldn't get it how should i pass multiple laravel variable to the ajax while i want to use resource controller's update method.
Level 102
@Bacherino Be aware that this wont work, as php is rendered before javascript. So php knows nothing about course_id
url: {{ route('courses.update',course_id ) }},
Instead you will need something like
url: '/courses/' + course_id,
1 like
Please or to participate in this conversation.