Changeset View
Changeset View
Standalone View
Standalone View
src/app/Mail/PaymentMandateDisabled.php
<?php | <?php | ||||
namespace App\Mail; | namespace App\Mail; | ||||
use App\Tenant; | |||||
use App\User; | use App\User; | ||||
use App\Utils; | use App\Utils; | ||||
use App\Wallet; | use App\Wallet; | ||||
use Illuminate\Bus\Queueable; | use Illuminate\Bus\Queueable; | ||||
use Illuminate\Mail\Mailable; | use Illuminate\Mail\Mailable; | ||||
use Illuminate\Queue\SerializesModels; | use Illuminate\Queue\SerializesModels; | ||||
class PaymentMandateDisabled extends Mailable | class PaymentMandateDisabled extends Mailable | ||||
Show All 24 Lines | class PaymentMandateDisabled extends Mailable | ||||
/** | /** | ||||
* Build the message. | * Build the message. | ||||
* | * | ||||
* @return $this | * @return $this | ||||
*/ | */ | ||||
public function build() | public function build() | ||||
{ | { | ||||
$user = $this->user; | $appName = Tenant::getConfig($this->user->tenant_id, 'app.name'); | ||||
$supportUrl = Tenant::getConfig($this->user->tenant_id, 'app.support_url'); | |||||
$subject = \trans('mail.paymentmandatedisabled-subject', ['site' => \config('app.name')]); | $subject = \trans('mail.paymentmandatedisabled-subject', ['site' => $appName]); | ||||
$this->view('emails.html.payment_mandate_disabled') | $this->view('emails.html.payment_mandate_disabled') | ||||
->text('emails.plain.payment_mandate_disabled') | ->text('emails.plain.payment_mandate_disabled') | ||||
->subject($subject) | ->subject($subject) | ||||
->with([ | ->with([ | ||||
'site' => \config('app.name'), | 'site' => $appName, | ||||
'subject' => $subject, | 'subject' => $subject, | ||||
'username' => $user->name(true), | 'username' => $this->user->name(true), | ||||
'walletUrl' => Utils::serviceUrl('/wallet'), | 'walletUrl' => Utils::serviceUrl('/wallet', $this->user->tenant_id), | ||||
'supportUrl' => \config('app.support_url'), | 'supportUrl' => $supportUrl, | ||||
]); | ]); | ||||
return $this; | return $this; | ||||
} | } | ||||
/** | /** | ||||
* Render the mail template with fake data | * Render the mail template with fake data | ||||
* | * | ||||
Show All 16 Lines |