mpociot / teamwork

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

Is it possible to override the default behaviour of the inviteteam ? #12

Closed minedun6 closed 9 years ago

minedun6 commented 9 years ago

I would like not to send an email but to make the invite process through the site by doing something like what Facebook does with their invitation system ? Is is possible ?

mpociot commented 9 years ago

I don't know what you mean with "Facebook invitation system", but you're totally free to notify the users however you like.

Teamwork::inviteToTeam( $email, $team, function( $invite )
{
    // Send slack message..
    // Send facebook message 
   // Sent internal message to user $invite->user
});

There's no restriction to send an email.

minedun6 commented 9 years ago

What I meant is that I was talking about the notifications system/the add friend system, i don't want to email them but i want the accept/refuse invitation process to go inside the site.

mpociot commented 9 years ago

Well, feel free to implement it this way.

But this has nothing to do with this package.

If you want to list all (open) invitations from your user, use the invites relation on your User model.