blue-twilight/app/Notifications/ResetPassword.php

48 lines
959 B
PHP

<?php
namespace App\Notifications;
use App\Mail\MailableBase;
use App\Mail\ResetMyPassword;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
class ResetPassword extends Notification
{
use Queueable;
use DatabaseEmailNotification;
/**
* The password reset token.
*
* @var string
*/
public $token;
/**
* Create a notification instance.
*
* @param string $token
* @return void
*/
public function __construct($token)
{
$this->token = $token;
}
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage|MailableBase
*/
public function toMail($notifiable)
{
$mailable = new ResetMyPassword($notifiable, $this->token);
$this->setPropertiesOnMailable($mailable, $notifiable);
return $mailable;
}
}