mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-26 06:34:41 +00:00
ResetPassword.php refactoring
This commit is contained in:
@@ -9,36 +9,25 @@ class ResetPassword extends Notification
|
|||||||
{
|
{
|
||||||
use Queueable;
|
use Queueable;
|
||||||
|
|
||||||
private $token;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new notification instance.
|
* Create a new notification instance.
|
||||||
*
|
|
||||||
* @param $token
|
|
||||||
*/
|
*/
|
||||||
public function __construct($token)
|
private function __construct(
|
||||||
{
|
private string $token
|
||||||
$this->token = $token;
|
) {}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the notification's delivery channels.
|
* Get the notification's delivery channels.
|
||||||
*
|
|
||||||
* @param mixed $notifiable
|
|
||||||
* @return array
|
|
||||||
*/
|
*/
|
||||||
public function via($notifiable)
|
public function via(mixed $notifiable): array
|
||||||
{
|
{
|
||||||
return ['mail'];
|
return ['mail'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the mail representation of the notification.
|
* Get the mail representation of the notification.
|
||||||
*
|
|
||||||
* @param mixed $notifiable
|
|
||||||
* @return \Illuminate\Notifications\Messages\MailMessage
|
|
||||||
*/
|
*/
|
||||||
public function toMail($notifiable)
|
public function toMail(mixed $notifiable): MailMessage
|
||||||
{
|
{
|
||||||
$reset_url = url('/create-new-password?token=' . $this->token);
|
$reset_url = url('/create-new-password?token=' . $this->token);
|
||||||
$app_name = get_settings('app_title') ?? 'VueFileManager';
|
$app_name = get_settings('app_title') ?? 'VueFileManager';
|
||||||
@@ -51,16 +40,4 @@ class ResetPassword extends Notification
|
|||||||
->line(__t('reset_password_line_2'))
|
->line(__t('reset_password_line_2'))
|
||||||
->salutation(__t('salutation') . ', ' . $app_name);
|
->salutation(__t('salutation') . ', ' . $app_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the array representation of the notification.
|
|
||||||
*
|
|
||||||
* @param mixed $notifiable
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function toArray($notifiable)
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user