2021-10-28 21:33:25 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Webkul\Admin\Mail;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
|
|
|
use Illuminate\Mail\Mailable;
|
|
|
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
|
|
|
|
|
|
|
|
class InvoiceOverdueReminder extends Mailable
|
|
|
|
|
{
|
|
|
|
|
use Queueable, SerializesModels;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create a new message instance.
|
|
|
|
|
*
|
|
|
|
|
* @param \Webkul\Customer\Contracts\Customer $customer
|
|
|
|
|
* @param \Webkul\Sales\Contracts\Invoice $invoice
|
2022-08-06 15:11:23 +00:00
|
|
|
* @return void
|
2021-10-28 21:33:25 +00:00
|
|
|
*/
|
|
|
|
|
public function __construct(
|
2022-04-01 14:57:11 +00:00
|
|
|
public $customer,
|
|
|
|
|
public $invoice
|
2021-10-28 21:33:25 +00:00
|
|
|
)
|
2022-08-06 15:11:23 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
2021-10-28 21:33:25 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Build the message.
|
|
|
|
|
*
|
|
|
|
|
* @return $this
|
|
|
|
|
*/
|
|
|
|
|
public function build()
|
|
|
|
|
{
|
|
|
|
|
return $this->from(core()->getSenderEmailDetails()['email'], core()->getSenderEmailDetails()['name'])
|
2022-08-06 15:11:23 +00:00
|
|
|
->to($this->customer->email)
|
|
|
|
|
->subject(trans('shop::app.mail.invoice.reminder.subject'))
|
|
|
|
|
->view('shop::emails.customer.invoice-reminder')->with([
|
|
|
|
|
'customer' => $this->customer,
|
|
|
|
|
'invoice' => $this->invoice,
|
|
|
|
|
]);
|
2021-10-28 21:33:25 +00:00
|
|
|
}
|
|
|
|
|
}
|