ldc-supportweb/app/Mails/Auth/LinkResetPasswordMail.php
2026-06-05 17:05:46 +02:00

52 lines
1.1 KiB
PHP

<?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.
*
* @return void
*/
public function __construct(
public string $url,
public mixed $user,
) {
}
/**
* 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,
],
);
}
}