Files
monica/app/Jobs/SendInvitationEmail.php
T
Régis Freyd 5b5b2da5f8 Add multi user support and subscriptions (#359)
This pull request adds support to multi users in one account. It also introduces the notion of subscriptions.

Accounts can now have multiple users.

Subscriptions are defined by a new env variable called REQUIRES_SUBSCRIPTION, and defaults to false. As promised, all the paid features on .com will be free if you download and host Monica on your own server.
2017-06-20 20:51:40 -04:00

39 lines
792 B
PHP

<?php
namespace App\Jobs;
use App\Invitation;
use App\Mail\InvitationSent;
use Illuminate\Bus\Queueable;
use Illuminate\Support\Facades\Mail;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
class SendInvitationEmail implements ShouldQueue
{
use InteractsWithQueue, Queueable, SerializesModels;
protected $invitation;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct(Invitation $invitation)
{
$this->invitation = $invitation;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
Mail::to($this->invitation->email)->send(new InvitationSent($this->invitation));
}
}