0

In examples on the Get stream Website, I see that they show examples where users are following other users and then they get to see the posts of the user they are following. How can I change this and make it so that users can follow a category(s) instead of a user and then see posts on their feed from the category(s) they are following? Currently, when I make a new post, I add a custom field to capture category id. Not sure what to do next.

I'm using the Get Stream for Laravel.

Maidul I
  • 133
  • 2
  • 10

1 Answers1

1

In Stream a feed can represent anything. So it can be a user, or a timeline (wall) or a category. Simply create a feed for the category and add the activities to it with the TO field. Then your user can follow the category feed.

More information about this can be found on the official docs: https://getstream.io/docs/#targetting

Tommaso Barbugli
  • 11,781
  • 2
  • 42
  • 41
Scott Lasica
  • 334
  • 2
  • 2
  • Great! But is there a method in the Laravel package? Or do I have to hard code everytime a post is created and add to the respective category? Because otherwise, I would have to build the data array by hand, right? – Maidul I Dec 30 '18 at 18:22