Answer the question
In order to leave comments, you need to log in
How to organize news feed algorithm in php?
I have a user base. There is a subscription to the user.
I want the user who subscribed to a certain user to be able to receive all the information from this user, i.e. "%user% updated status", "%user% changed avatar" and so on. Prompt idea and what tables are necessary in a .
Answer the question
In order to leave comments, you need to log in
Users, Subscriptions (who subscribed to whom), Actions (who did what).
Next, for the desired user, we get a list of his subscriptions, by subscriptions we get a list of all actions, sorted, for example, by date.
Accordingly, when changing the status, we also need to write "action" in the action table so that this status change appears in the subscribers' feed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question