File: D:/HostingSpaces/netwerkbrabant/netwerkbrabant.nl/app/Mail/Events/SignedUpFreePlusOneMail.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 Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Log;
class SignedUpFreePlusOneMail extends Mailable
{
use Queueable, SerializesModels;
private $eventSignUp;
private $event;
private $siteUrl;
private $signedUpBy;
// private $paymentLink;
// private $pdfPath;
/**
* SignedUpPlusOneMail constructor.
* @param Event $event
* @param EventSignUp $eventSignUp
* @param string $signedUpBy
*/
public function __construct(Event $event, EventSignUp $eventSignUp, string $signedUpBy)
{
// $this->paymentLink = $paymentLink;
$event->load('translation', 'images');
$this->event = $event;
$this->eventSignUp = $eventSignUp;
$this->signedUpBy = $signedUpBy;
// $this->pdfPath = $pdfPath;
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.signedUpPlusOne'))
->to($this->eventSignUp->email)
->with([
'firstName' => $this->eventSignUp->first_name,
'lastName' => $this->eventSignUp->last_name,
'event' => $this->event,
// 'paymentLink' => $this->paymentLink,
'signedUpBy' => $this->signedUpBy,
'siteUrl' => $this->siteUrl,
]);
// ->attach($this->pdfPath);
}
}