osb/app/Notifications/ResetPassword.php
Deon George b1067e1378
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 1m14s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s
Added Passkey login, fixed password reset as a result of updating laravel
2024-07-23 00:13:54 +10:00

36 lines
888 B
PHP

<?php
namespace App\Notifications;
use App\Models\Site;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Auth\Notifications\ResetPassword as ResetPasswordNotification;
use Illuminate\Notifications\Messages\MailMessage;
class ResetPassword extends ResetPasswordNotification implements ShouldQueue
{
use Queueable;
/**
* Build the mail representation of the notification.
*
* @param mixed $notifiable
* @return MailMessage
*/
public function toMail($notifiable): MailMessage
{
$site = Site::findOrFail($notifiable->site_id);
if (static::$toMailCallback) {
return call_user_func(static::$toMailCallback, $notifiable, $this->token);
}
return (new MailMessage)
->markdown('email.user.passwordreset',[
'site'=>$site,
'user'=>$notifiable,
'reset_link'=>route('password.reset',$this->token,true),
]);
}
}