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/SBogers10/zelfverkopen.komma.pro/app/Mail/CreditInvoiceCreatedMail.php
<?php

namespace App\Mail;

use App\KommaApp\Customers\Models\Customer;
use App\KommaApp\Orders\Models\Order;
use App\KommaApp\Orders\OrderService;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;

class CreditInvoiceCreatedMail extends Mailable
{
    use Queueable, SerializesModels;

    protected $customer;
    protected $order;
    protected $invoicePath;


    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct(Customer $customer, Order $order, $invoicePath)
    {
        $this->customer = $customer;
        $this->order = $order;
        $this->invoicePath = $invoicePath;
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        return $this->view('site.emails.client.creditInvoiceCreated')
            ->subject(trans('site/email.client.creditInvoiceCreated.subject'))
            ->to($this->customer->email)
            ->attach($this->invoicePath)
            ->with([
                'genderId' => $this->customer->gender,
                'lastName' => $this->customer->last_name,
                'order' => $this->order
            ]);
    }
}