using the query builder for a many to many relationship?

Posted 6 days ago by michalis

I have a campaigns table and and an items table, and the pivot table is campaign_item

is it possible to use the query builder to get all items that belong to a campaign?

I ask because I need to chain some queries on it, but in the docs it only shows how to get the relationship through eloquent

I search online and there are a few threads about the subject but I'm still not sure how to go about it

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.