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/brameda/brameda.nl/app/Notifications/CustomerRegistered.php
<?php

namespace App\Notifications;

use App\Komma\Users\Models\SiteUser;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage;

/**
 * Confirmation to an admin that a customer has registered an account
 *
 */
class CustomerRegistered extends Notification
{
    use Queueable;

    /** @var SiteUser $customer */
    private $customer;

    /**
     * Create a new notification instance.
     *
     * @param SiteUser $customer
     */
    public function __construct(SiteUser $customer)
    {
        $this->customer = $customer;
    }

    /**
     * Get the notification's delivery channels.
     *
     * @param  mixed $notifiable
     * @return array
     */
    public function via($notifiable)
    {
        return ['mail'];
    }

    /**
     * Get the mail representation of the notification.
     *
     * @param  mixed $notifiable
     * @return \Illuminate\Notifications\Messages\MailMessage
     */
    public function toMail()
    {

        $message = (new MailMessage)->view('emails.customer.registered', [
            'customer' => $this->customer
        ])->subject(__('notifications.customer_registered.subject', ['first_name' => $this->customer->first_name, 'last_name' => $this->customer->last_name]));

        return $message;
    }

    /**
     * Get the array representation of the notification.
     *
     * @param  mixed $notifiable
     * @return array
     */
    public function toArray($notifiable)
    {
        return [
            //
        ];
    }
}