public function getPendingInvitationsForUser($user)
    {
        $invitations = $user->invitations()->with('team.owner')->get();

        foreach ($invitations as $invite) {
            $invite->setVisible(['id', 'team']);

            $invite->team->setVisible(['name', 'owner']);

            $invite->team->owner->setVisible(['name']);
        }

        return $invitations;
    }