Changeset View
Changeset View
Standalone View
Standalone View
src/app/Mail/SignupInvitation.php
<?php | <?php | ||||
namespace App\Mail; | namespace App\Mail; | ||||
use App\SignupInvitation as SI; | use App\SignupInvitation as SI; | ||||
use App\Tenant; | |||||
use App\Utils; | use App\Utils; | ||||
use Illuminate\Bus\Queueable; | use Illuminate\Bus\Queueable; | ||||
use Illuminate\Mail\Mailable; | use Illuminate\Mail\Mailable; | ||||
use Illuminate\Queue\SerializesModels; | use Illuminate\Queue\SerializesModels; | ||||
use Illuminate\Support\Str; | use Illuminate\Support\Str; | ||||
class SignupInvitation extends Mailable | class SignupInvitation extends Mailable | ||||
{ | { | ||||
Show All 18 Lines | class SignupInvitation extends Mailable | ||||
/** | /** | ||||
* Build the message. | * Build the message. | ||||
* | * | ||||
* @return $this | * @return $this | ||||
*/ | */ | ||||
public function build() | public function build() | ||||
{ | { | ||||
$href = Utils::serviceUrl('/signup/invite/' . $this->invitation->id); | $appName = Tenant::getConfig($this->invitation->tenant_id, 'app.name'); | ||||
$href = Utils::serviceUrl('/signup/invite/' . $this->invitation->id, $this->invitation->tenant_id); | |||||
$this->view('emails.html.signup_invitation') | $this->view('emails.html.signup_invitation') | ||||
->text('emails.plain.signup_invitation') | ->text('emails.plain.signup_invitation') | ||||
->subject(__('mail.signupinvitation-subject', ['site' => \config('app.name')])) | ->subject(\trans('mail.signupinvitation-subject', ['site' => $appName])) | ||||
->with([ | ->with([ | ||||
'site' => \config('app.name'), | 'site' => $appName, | ||||
'href' => $href, | 'href' => $href, | ||||
]); | ]); | ||||
return $this; | return $this; | ||||
} | } | ||||
/** | /** | ||||
* Render the mail template with fake data | * Render the mail template with fake data | ||||
Show All 18 Lines |