ldc-supportweb/app/Mails/Auth/LinkResetPasswordMail.php

53 lines
1.1 KiB
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace App\Mails\Auth;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
class LinkResetPasswordMail extends Mailable
{
/**
* Create a new message instance.
2026-05-19 12:25:21 +02:00
*
* @return void
*/
public function __construct(
public string $url,
public mixed $user,
2026-05-19 12:25:21 +02:00
) {
}
/**
* Get the message envelope.
*/
public function envelope(): Envelope
{
return new Envelope(
to: $this->user->getEmailForPasswordReset(),
subject: sprintf(
'%s - %s',
trans('auth.email_title_reset_password'),
config('app.name')
),
);
}
/**
* Get the message content definition.
*/
public function content(): Content
{
return new Content(
markdown: 'back.mails.link-reset-password',
with: [
'url' => $this->url,
'user' => $this->user,
],
);
}
}