Using with pusher #782
-
Hello, I'm trying to use this with Pusher. And I have an ActivityLogged event, which when triggered will update the frontend notification via Pusher. But the thing is, what would be the best way to trigger the ActivityLogged event? I mean, I could go to my model observers and fire the event one by one. But is there a better way? I mean, does this package expose an event? Like activity logged or something, which we could listen to and use that to fire other events. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey, you have already listed the "best" way yourself. 😉 |
Beta Was this translation helpful? Give feedback.
Hey,
you have already listed the "best" way yourself. 😉
The
Activity
model is a default eloquent model - so you can add an observer on this model which will trigger every time any activity is created.