File: D:/HostingSpaces/ZelfVerkopen/zelfverkopen.nl/app/Mail/PaymentLinkMail.php
<?php
namespace App\Mail;
use App\KommaApp\Customers\Models\Customer;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
class PaymentLinkMail extends Mailable
{
use Queueable, SerializesModels;
protected $products;
protected $customer;
protected $url;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct(Customer $customer, $url, $products)
{
$this->products = $products;
$this->customer = $customer;
$this->url = $url;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->view('site.emails.client.paymentLink')
->subject(trans('site/email.client.paymentLink.subject'))
->to($this->customer->email)
->with([
'link' => $this->url,
'genderId' => $this->customer->gender,
'lastName' => $this->customer->last_name,
'products' => $this->products
]);
}
}