File: D:/HostingSpaces/stafa/stafa.nl/app/Notifications/KmsResetPasswordNotification.php
<?php
namespace App\Notifications;
use App\Komma\Users\Models\KmsUser;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
class KmsResetPasswordNotification extends Notification
{
use Queueable;
/** @var KmsUser $customer */
private $kmsUser;
/** @var string $token The password reset token */
private $token;
/**
* Create a new notification instance.
*
* @param KmsUser $kmsUser
* @param string $token The password reset token
*/
public function __construct(KmsUser $kmsUser, string $token)
{
$this->token = $token;
$this->kmsUser = $kmsUser;
}
/**
* 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($notifiable)
{
// return (new MailMessage)
// ->greeting(__('kms/passwords.greeting'))
// ->line(__('kms/passwords.introduction'))
// ->action(__('kms/passwords.clickToReset'), route('kms.password.reset', ['token' => $this->token]))
// ->line(__('kms/passwords.outro'));
$mail = (new MailMessage)->view('emails.kms.resetPassword', [
'customer' => $this->kmsUser,
'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 [
//
];
}
}