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?
image.png
Was this page helpful?