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/netwerkbrabant.komma.pro/app/Mail/Events/SignedUpFreeMail.php
<?php

namespace App\Mail\Events;

use App\KommaApp\Events\Models\Event;
use App\KommaApp\EventSignUps\Models\EventSignUp;
use App\KommaApp\Orders\Models\Order;
use Barryvdh\DomPDF\PDF;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Support\Facades\Log;

class SignedUpFreeMail extends Mailable
{
    use Queueable, SerializesModels;

    private $eventSignUp;
    private $event;
    private $siteUrl;
//    private $pdfPath;

    /**
     * SignedUpMail constructor.
     * @param Event $event
     * @param EventSignUp $eventSignUp
     */
    public function __construct(Event $event, EventSignUp $eventSignUp)
    {
        $event->load('translation', 'images');
        $this->event = $event;
        $this->eventSignUp = $eventSignUp;

        if(config('app.env') !== 'production') $this->siteUrl = 'http://netwerkbrabant.komma.pro';
        else $this->siteUrl = config('site.company.url');
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        Log::info(self::class.': Send');

        return $this->view('site.emails.events.signedUpFree')
            ->subject(trans('site/emails.events.signedUp'))
            ->to($this->eventSignUp->email)
            ->with([
                'firstName' => $this->eventSignUp->first_name,
                'lastName' => $this->eventSignUp->last_name,
                'event' => $this->event,
                'siteUrl' => $this->siteUrl,
//            'pdfAttached' => $pdfAttached,
            ]);
    }
}