Files
bm/public_html/app/Notifications/MyOwnResetPassword.php
2025-09-24 13:26:28 +02:00

69 lines
1.8 KiB
PHP

<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
class MyOwnResetPassword 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)
{
return (new MailMessage())
->from('password-reset@bruckmuehle.at')
->subject('Password zurücksetzen')
->greeting('Hallo')
->line('Jemand hat die Rücksetzung Ihres Bruckmühle-Passworts beantragt. Wenn Sie Ihr Passwort ändern möchten, klicken Sie auf folgenden Button:')
->action('Passwort zurücksetzen', url(config('app.url').route('password.reset', $this->token, false)))
->line('Wenn Sie diese Änderung nicht beantragt haben, ignorieren Sie diese Nachricht.')
->line('Freundliche Grüße')
->salutation('Das Bruckmühle-Team');
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toArray($notifiable)
{
return [
//
];
}
}