Stack: Laravel v8, MySQL.
I working on a payroll system with Laravel.
I want the value of some columns to update if another column it depends on changes.
For example, if the Number of working days changes on the payrolls table, then the salary and other columns that depends on 'Number of working days' column should re-calculate based on the new value and save to the database.
How do I go about this? Are there any Laravel packages that handles this efficiently?