Hi there,
I'm developing an e-commerce app.
In create new product I add a button to add product variations details. In regular form usually it would be name property something like
name = "variation[quantity][]"
name = "variation[price][]"
Then in laravel as backend it would receive a two dimensional array.
But with v-model I couldn't find a way to use array. How can I make it work? I use inertia.js and useForm by the way.
Thanks in forward.
@martinbean Thanks for your response. I made a method to push an object when adding new variation. It solved the issue. I have another issue with validation.
Validate response sends variation.0.value in error message I use variatin.index.value but it can't be read and throw an error something like there is no such this thing.
I used variation.${index}.value with back tick but it sends the phrase as message in inertia InputError component. Validation variation.*.value get complicated as well. I think I should pass index to input error component somehow!