Livewire - Don't understand how it works
Hello,
I'm trying to make a field that allows me to add a promo code to a table of "extras and discounts".
I would like (as in the attached screenshot) to have a text field with a button to validate the promo code. When the button is clicked, a row should be added to the discount table with the data of the promo code. How can I do this?
4 Replies
you need to use compinabatin of validateOnly and $set
Thank you for your answer. Can you give me an example? I don't really understand how I can do this by adding a button
button is an action button so in that action you need to do all the logic
search here on discord you will find similar answers
the button can be a “suffixAction()” if you specifically search for examples of that