Files
lelong/app/Notifications/PasswordResetNotification.php
T
ismailmasseran e29a5891c8 Bugfix/list clickup issue (#5)
Reviewed-on: #5
Co-authored-by: ISMAIL MASSERAN <ismail@koppkb.com>
Co-committed-by: ISMAIL MASSERAN <ismail@koppkb.com>
2026-10-19 13:30:36 +08:00

69 lines
1.7 KiB
PHP

<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Illuminate\Support\Facades\Lang;
class PasswordResetNotification extends Notification
{
use Queueable;
public $token;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct($token)
{
$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.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
{
$urlToResetForm = 'http://localhost:8000/api/password/reset?token='.$this->token;
return (new MailMessage)
->subject(Lang::get('Hey! Reset Password Notification'))
->line(Lang::get('You requested here you go!'))
->action(Lang::get('Reset Password'), $urlToResetForm)
->line(Lang::get('This password reset link will expire in :count minutes.', ['count' => config('auth.passwords.users.expire')]))
->line(Lang::get('If you did not request a password reset, no further action is required. Token: ==>'.$this->token));
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toArray($notifiable)
{
return [
//
];
}
}