This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Rob Ballantyne
Rob Ballantyne

Hi, I've been looking at how the blog plugin works and I'm left wondering how to manipulate the collection.

$obj = newQuery(); For my product model gets all products and relationships. This is good but I would like to filter down the related model. Example each product had several links because they are targeted to specific user groups so therefore each link belongs to many groups. When I run a query I need to return all product data but it should only return one link per product in the collection according to the group I specify. Can anyone help me approach this? I don't have a lot of experience with eloquent and query builder so apologies. Thanks

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.