Right now this method will only allow you to invite a user from the authenticated user. In some use-cases its necessary to allow the inviting user to be defined.
One example use-case is an administration usage. Maybe an admin needs to assist with creating a team and/or inviting users to their team.
You could allow it to fallback to the authenticated user if the inviter is null.
https://github.com/mpociot/teamwork/blob/2869eca7a3e00ef8a2d755027c1a2e58dce67b5a/src/Teamwork.php#L67
Right now this method will only allow you to invite a user from the authenticated user. In some use-cases its necessary to allow the inviting user to be defined.
One example use-case is an administration usage. Maybe an admin needs to assist with creating a team and/or inviting users to their team.
You could allow it to fallback to the authenticated user if the inviter is
null
.