Skip to content

Feature Request: Passing Team ID via Named Argument #1993

Answered by erikn69
AAllport asked this question in Q&A
Discussion options

You must be logged in to vote

$user->hasPermission('post.create',teamId: $post->team_id);

that will not work because hasPermission uses preload permissions/roles relations, and there is a wherePivot

return $relation->wherePivot(PermissionRegistrar::$teamsKey, getPermissionsTeamId());

return $relation->wherePivot(PermissionRegistrar::$teamsKey, getPermissionsTeamId())

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@AAllport
Comment options

@AAllport
Comment options

@erikn69
Comment options

@AAllport
Comment options

@erikn69
Comment options

Answer selected by AAllport
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants