This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
I want to run a function whenever I add or update a post using the plugin i made with plugin builder, in the backend.
I made one model called Events and one called Logs. If i go to the backend and and create an Event, i want log what i just did, and put an entry in the Logs model of what Event i made, wich Backenduser made it, etc.
Where is the function that saves my Events? Or how should i approach this?
Last updated
Or, where can I find the function that saves / updates my Model? When that model is made by builder plugin ?
Look into the Model events: https://octobercms.com/docs/api/model/aftersave. You can also look at using my plugin for audit logging: https://octobercms.com/plugin/luketowers-easyaudit
1-4 of 4