App Trigger
marena opened this issue · 1 comments
marena commented
Any way I can catch App events? For example on afterSave I want to send all client message?
consik commented
What a problem? If you save your model in same script where your websocket opened you can handle events as always http://www.yiiframework.com/doc-2.0/guide-concept-events.html.
But if you saving your model by other request just save somewhere model PrimaryKey and EventType. For example create table application_events(id, model, pk, event) and check this table for new records by your websocket server script.