5b5b2da5f8
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.
39 lines
792 B
PHP
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));
|
|
}
|
|
}
|