theres a great package to do exactly that:
Jun 26, 2023
7
Level 3
How to log model history
I need to log history of entity changes, but including its relations. The first idea was to use events. BUT there is a problem. I can not ensure that whole entity including its relations will be stored when update event triggers. So the question is what is a best practise for something like this. I would like to have history like some properties in the table and whole entity including relations like json in the table.
How to do it if entity->save() is called before relations->sync()?
Thanks for help.
Please or to participate in this conversation.