Separated laravel app to its own folder (#540)
This commit is contained in:
41
api/app/Mail/UserInvitationEmail.php
Normal file
41
api/app/Mail/UserInvitationEmail.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use App\Models\UserInvite;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class UserInvitationEmail extends Mailable implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
use SerializesModels;
|
||||
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @param string $workspaceName
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(public UserInvite $invite)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
$workspaceName = $this->invite->workspace->name;
|
||||
return $this
|
||||
->markdown('mail.user.invitation', [
|
||||
'workspaceName' => $workspaceName,
|
||||
'inviteLink' => $this->invite->getLink(),
|
||||
])->subject('You are invited to join ' . $workspaceName . ' on OpnForm');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user