HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
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
            ]);
    }
}