DEV Community

To do or not to do, whats more good of a practice.

Mohammed Samgan Khan on July 24, 2019

Considering a hypothetical situation, in which a user makes a request to admin for a change in his profile which only admin can edit. After proces...
Collapse
 
chrisrhymes profile image
C.S. Rhymes

You could use an auditing package to keep track of changes against specific models rather than storing it on the model itself. I quite like using Spatie Activity Log for this. You could then send a notification with the details of the change if you wanted.

Collapse
 
msamgan profile image
Mohammed Samgan Khan

thanks, CS
seems like an intresting idea.

Collapse
 
msamgan profile image
Mohammed Samgan Khan

means retain the request as well as add the response of that request to DB also.