Jun 29, 2021
0
Level 1
Policy for BelongsToMany relations
Suppose we have a model with two "belongs to many" relations on User model,
For example a Podcast witch which has "guests" & "broadcasters" relation both leading to "User" with separate pivot tables,
According to docs, an attachAny{model} pattern is required to handle authorization on these relations, meaning one attachAnyUser on podcast policy handles both the relations mentioned above!
now I was wondering if there's any workaround for having separate methods on policy on these relations instead of just one.
Please or to participate in this conversation.