Answer the question
In order to leave comments, you need to log in
How to add a field using jQuery and pass them to Laravel?
You need to write several records to the database.
When opening the page, there is one input field. either by the "+" button, or (which is better) when you start typing, a new field appears for a new entry. by clicking on the "add" button, all completed rows are added to the database.
How to combine jQuery and Laravel in this situation, so that jQuery passes the number of rows and their values to write to the database?
Answer the question
In order to leave comments, you need to log in
Add fields with name='name[]'
Input or Request can take an array as input.
Request::input('name') will return an array. And then as normal work with an array (you can disassemble it in a loop, count it using count(), etc.).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question