Hi, there is a nice video about how to implement RecordsActivity trait which uses Model events and inserts data to the database on various events: https://laracasts.com/lessons/build-an-activity-feed-in-laravel and https://github.com/laracasts/Build-An-Activity-Feed-in-Laravel
I would like to make it transactional (always store audit data AND the subject, or do not store anything), but I am not sure how to implement it with the model events.
Should I begin the transaction on
creating and end the transaction on
Thank you for suggestions.