Query to Relationship

Posted 6 months ago by socieboy

I have 2 Models, User and Project... A User has a Project but it can invite other Users to work in this Project... How I do query all my projects, the ones I own and the ones I have been assigned.

User::find(1)->projects()->get();

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

Reply to

Use Markdown with GitHub-flavored code blocks.