Enhance InvoiceDataMail to accept a dynamic subject and update SendInvoiceDataReport command accordingly
This commit is contained in:
@@ -14,16 +14,20 @@ class InvoiceDataMail extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
public $tableData;
|
||||
public $scheduleType;
|
||||
|
||||
public $tableData;
|
||||
|
||||
public $mailSubject;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*/
|
||||
public function __construct($scheduleType,$tableData = [])
|
||||
public function __construct($scheduleType, $tableData = [], $mailSubject)
|
||||
{
|
||||
$this->scheduleType = $scheduleType;
|
||||
$this->tableData = $tableData ?? [];
|
||||
$this->scheduleType = $scheduleType;
|
||||
$this->tableData = $tableData ?? [];
|
||||
$this->mailSubject = $mailSubject ?? 'Invoice Data Report';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -32,7 +36,7 @@ class InvoiceDataMail extends Mailable
|
||||
public function envelope(): Envelope
|
||||
{
|
||||
return new Envelope(
|
||||
subject: 'Invoice Data Report',
|
||||
subject: $this->mailSubject,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user