Skip to content

How to use pivot table on many to many? #1248

@shawn-lin

Description

@shawn-lin

If pivot table has been created, ex:user_group.

And users and groups collection doesn't have group_ids and user_ids field.

Any way to get groups by $user->groups or User::with("groups") statement?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions