File: D:/HostingSpaces/SBogers95/rentman.io/app/Notifications/CustomerRegisteredSetPassword.php
<?php
namespace App\Notifications;
use App\Komma\Users\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
/**
* Class CustomerRegisteredSetPassword
*
* Notitication to tell a user to set his password
*/
class CustomerRegisteredSetPassword extends Notification
{
use Queueable;
/** @var User */
private $customer;
/** @var string */
private $token;
/**
* Create a new notification instance.
*
* @param User $customer
* @param string $token
*/
public function __construct(User $customer, string $token)
{
$this->customer = $customer;
$this->token = $token;
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return ['mail'];
}
/**
* Get the mail representation of the notification.
*
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail()
{
$mail = (new MailMessage)->view('emails.customer.setPassword', [
'customer' => $this->customer,
'token' => $this->token,
])->subject(__('notifications.customer_set_password.subject'));
return $mail;
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toArray($notifiable)
{
return [
//
];
}
}