samedi 21 août 2021

How to post lots of data to laravel database

please i am trying to submit this date to a database in laravel...i want to submit all same time, this is just two rows but i want even if it gets to 10 rows i can submit.

0: {item: "Electronics", subitem: "Laptop", subitem2: "Hard D", unit: "Length - meter (m)"}
1: {item: "Electronics", subitem: "Laptop", subitem2: "Hard D", unit: "Length - meter (m)"}

What i have tried

 for ($i = 1; $i < count($request->item); $i++) {
          
        }

I tried to do a for loop using the above code but its not working..got the below error

count(): Parameter must be an array or an object that implements Countable



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3gnHbVp
via IFTTT

Aucun commentaire:

Enregistrer un commentaire