I have created a stock module in yii2. Using gii functionality I can add products to table. But what to do when product already exists in the table and new quantity needs to be added to existing quantity leaving total quantity in db. For example,
Products
Quantity
5
I need to update Quantity by any value for example '5+3', leaving other fields of sql table unchanged.
need output like below
Quantity
8
How do I update my controller to do that? And of course I want to be able to do it in create action.