Wondering if anyone has any quick advice about how to best to track all user CRUD behavior in a searchable, legally-enforceable manner.
Laravel 5.6, Vue 2.x, dealing with protected health info and needing to (most likely) track all changes to models/records. I am not familiar with Slack as a logging solution but understand that I likely need to learn it.
I see that Model Observers may be a good solution. That alone will be a lot of duplication, however, not sure if there's a better way? I'd have a Model Observer for every major model and a lot of duplicate code. Given that there's scaffolding as of maybe 5.3 for Model Observers, I'm assuming that this is the way that the core team is moving things (model boot method for small use cases, model observers on a per-class basis for more formal use cases). Limited documentation yet on best uses of Observers.
Next, I'm not sure exactly what to do from the model events. Should I fire Log entries or maybe record DB events in its own series of tables for capturing crud events? Is firing a DB notification a good method here? My case again is that I have to record the history of every change, who queries and when, all ip hits, etc.
I've been building apps without huge need for events, notifications or logs. I'm just not sure how to best use these 3 major concepts properly. To elaborate, I like the idea of a table or schema that I can query for history as opposed to text-based logs (again noting my ignorance on slack).
Any advice appreciated. Thanks in advance. -Marcus