DEV Community

Mohammed Samgan Khan
Mohammed Samgan Khan

Posted on

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

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 processing the request, in either case, acceptance as well as denial. what's more good of a practice. To keep it in DB with a status tag, that says whats happened to the request. Or informing the user about is through mail or something and delete the request.

exp. developers of the community please share your wisdom to this young apprentice.

Top comments (3)

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.