sarga/packages/Webkul/Admin/src/Mail/NewCustomerNotification.php

43 lines
1.0 KiB
PHP
Raw Normal View History

<?php
namespace Webkul\Admin\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
class NewCustomerNotification extends Mailable
{
use Queueable, SerializesModels;
/**
* Create a new message instance.
2020-03-05 05:34:57 +00:00
*
* @param \Webkul\Customer\Contracts\Customer $order
2020-03-05 13:37:08 +00:00
* @param string $password
* @return void
*/
2020-03-05 05:34:57 +00:00
public function __construct(
public $customer,
public $password
2020-03-05 05:34:57 +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.customer.new.subject'))
->view('shop::emails.customer.new-customer')->with([
'customer' => $this->customer,
'password' => $this->password,
]);
}
}