I'm a beginner in laravel, I would like to update multiple rows using one input field.
My Database records:
For an instance, my input field has the value of 500, When I submit this field, it will then Update the multiple selected id from database from oldest to latest.
If the first row has the quantity of 100 it will be 500 - 100, and then it will proceed to the second row in which the value of input field is now 400 and it will again get the difference of the second row 400 - 200 until the input field becomes 0.
Is this possible? Thank you.