I'm using Laravel to post a series of products. The user can choose a quantity of each product.
Now I'm wondering how I can post a series, but still have the names of the products.
I have tried the following.
This result gives me an undefined offset error
<input name="{{ $products[$product->id] }}" />
This result doesn't include the name, but does make it a series
<input name="products[]" />
Aucun commentaire:
Enregistrer un commentaire