sarga/packages/Webkul/Admin/src/Mail/NewInventorySourceNotificat...

49 lines
1.2 KiB
PHP
Raw Normal View History

2019-04-09 11:34:20 +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 NewInventorySourceNotification extends Mailable
{
use Queueable, SerializesModels;
/**
* The shipment instance.
*
2020-03-05 05:34:57 +00:00
* @var \Webkul\Customer\Contracts\Shipment
2019-04-09 11:34:20 +00:00
*/
public $shipment;
/**
* Create a new message instance.
*
2020-03-05 05:34:57 +00:00
* @param \Webkul\Customer\Contracts\Shipment $shipment
2019-04-09 11:34:20 +00:00
* @return void
*/
public function __construct($shipment)
{
$this->shipment = $shipment;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
2019-04-17 06:54:41 +00:00
{
$order = $this->shipment->order;
2020-02-19 10:26:44 +00:00
2019-04-09 11:34:20 +00:00
$inventory = $this->shipment->inventory_source;
return $this->from(core()->getSenderEmailDetails()['email'], core()->getSenderEmailDetails()['name'])
2020-03-19 11:37:46 +00:00
->to($inventory->contact_email, $inventory->name)
->subject(trans('shop::app.mail.shipment.subject', ['order_id' => $order->increment_id]))
->view('shop::emails.sales.new-inventorysource-shipment');
2019-04-09 11:34:20 +00:00
}
}