public function handle(InviteUserCommand $command)
    {
        foreach ($command->emails as $email) {
            $invite = Invite::create([
                'email' => $email,
            ]);

            $invite->notify(new InviteUserNotification());

            event(new UserWasInvitedEvent($invite));
        }
    }
public function handle(InviteUserCommand $command)
    {
        foreach ($command->emails as $email) {
            $invite = Invite::create([
                'email' => $email,
            ]);

            $invite->notify(new InviteUserNotification());

            event(new UserWasInvitedEvent($invite));
        }
    }
public function handle ( InviteUserCommand $ command ) { foreach ( $ command -> emails as $ email ) { $ invite = Invite :: create ( [ 'email' => $ email , ] ) ; $ invite -> notify ( new InviteUserNotification ( ) ) ; event ( new UserWasInvitedEvent ( $ invite ) ) ; } }
Handle the invite team member command.

@param \CachetHQ\Cachet\Bus\Commands\User\InviteUserCommand $command

@return void
Handle the invite team member command .