A financial app must log every change to an Account model (old values, new values, user who changed it). What is the most maintainable Laravel approach?
-
A
Create an AuditLog model and record changes inside an Eloquent observer's updating and deleting hooks
-
B
Add logging code inside every controller method that touches accounts
-
C
Use a database trigger to insert audit rows on UPDATE
-
D
Store a JSON snapshot of every model in the session after each save