mpociot / teamwork

User to Team associations with invitation system for the Laravel 5 Framework
MIT License
1.07k stars 170 forks source link

inTeam method for user #60

Closed lukasoppermann closed 7 years ago

lukasoppermann commented 8 years ago

Hey @mpociot, I think a method inTeam($team) or isMemberOfTeam($team) would be very useful for the User model.

For example when a user updates a something in a team and you want to check if the user is allowed to do this. It is basically used here: https://github.com/mpociot/teamwork/blob/master/src/Mpociot/Teamwork/Traits/UserHasTeams.php#L257

If you agree I would be willing to send a PR.

mpociot commented 7 years ago

Sure - feel free to send a PR! :)

lukasoppermann commented 7 years ago

I actually currently stoped developing in PHP and will not be using this (very awesome) package at the moment, so I won't send a PR.