Answer the question
In order to leave comments, you need to log in
How to properly organize events and listeners (event, listener)?
Hello.
For educational purposes, I decided to deal with the events and implement a small collection of information about the site visitor.
For example, a user visits a post page, likes it, views a product. I would like to save all this data separately, the number of visits to blog pages, product views, the number of likes, user ip, and so on.
The question arose whether it is necessary to create a separate event for counting visits, separately for counting likes ... or create one event and different listeners for it and call those listeners that are needed at a certain moment, in the controller or model?
How to implement this at all, how would you do it?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question