I use the PostWillBeSaved
event to listen for new discussions and changes to posts. How to differentiate the type of the event within the event? Somethink like:
$events->listen(PostWillBeSaved::class, function (PostWillBeSaved $event) {
// $event->type might be 'new', 'edit', 'hide', 'delete' etc.
});
Basically when the post gets hidden or deleted, I simply want to ignore these action. What I'm basically looking for is, when ever there is a new post or the content gets changed.