update
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Mail;
|
||||
|
||||
use App\Mail\Concerns\BuildsTemplateEnvelope;
|
||||
use App\Support\AutoEmailGate;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Mail\Mailables\Content;
|
||||
@@ -22,6 +23,7 @@ class GenericTemplateMail extends Mailable
|
||||
public readonly string $renderedSubject,
|
||||
public readonly string $renderedHtml,
|
||||
public readonly array $mailConfig = [],
|
||||
public readonly ?string $scenario = null,
|
||||
) {}
|
||||
|
||||
public function envelope(): Envelope
|
||||
@@ -33,4 +35,9 @@ class GenericTemplateMail extends Mailable
|
||||
{
|
||||
return new Content(htmlString: $this->renderedHtml);
|
||||
}
|
||||
|
||||
public function buildViewData()
|
||||
{
|
||||
return [...parent::buildViewData(), AutoEmailGate::SCENARIO_DATA_KEY => $this->scenario];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user