Single Model with belongsToMany : How to query?

Posted 9 months ago by yougotnet

I have users who own Accounts (Account Model) and I have users who share accounts with other users by way of Many to Many Relationship (account_user table).

Does Eloquent provide an easy way to retrieve the accounts for a particular user that includes the accounts he owns and the accounts that are shared with him?

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

Reply to

Use Markdown with GitHub-flavored code blocks.