Changeset View
Changeset View
Standalone View
Standalone View
src/app/Mail/PasswordReset.php
Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | class PasswordReset extends Mailable | ||||
*/ | */ | ||||
public static function fakeRender(string $type = 'html'): string | public static function fakeRender(string $type = 'html'): string | ||||
{ | { | ||||
$code = new VerificationCode([ | $code = new VerificationCode([ | ||||
'code' => Str::random(VerificationCode::CODE_LENGTH), | 'code' => Str::random(VerificationCode::CODE_LENGTH), | ||||
'short_code' => VerificationCode::generateShortCode(), | 'short_code' => VerificationCode::generateShortCode(), | ||||
]); | ]); | ||||
// @phpstan-ignore-next-line | |||||
$code->user = new User([ | $code->user = new User([ | ||||
'email' => 'test@' . \config('app.domain'), | 'email' => 'test@' . \config('app.domain'), | ||||
]); | ]); | ||||
$mail = new self($code); | $mail = new self($code); | ||||
return Helper::render($mail, $type); | return Helper::render($mail, $type); | ||||
} | } | ||||
} | } |