0
我向用户发送2封电子邮件,当他注册时发送一封电子邮件,当他要求重置密码(忘记密码功能)时发送一封电子邮件。该代码与上述两种功能类似。但是,每当用户注册新帐户时,电子邮件都会成功发送,但我得到View [] not found (View:/home/vagrant/Laravel/youtube/resources/views/emails/password/reset.blade.php)
错误。类似的代码,只是改变了文件名和一些后端逻辑。在Laravel发送邮件时查看未找到错误
下面是在此邮件被发送的代码(邮件类)
public function build() {
return $this->subject('Reset your password')
->markdown('emails.password.reset')
->text('emails.password.reset_text');
}
这里的降价文件emails/password/reset.blade.php
@component('mail::message')
<strong>Hello {{ $token->user->getFirstNameOrUserName() }}!</strong>
You are receiving this email because we received a password reset request for your account.
If you did not request a password reset, no further action is required.
@component('mail::button', [
'url' => route('password.reset', ['token' => $token,]) . '?email=' . urlencode($token->user->email)
])
Reset Password
@endcomponent
Thanks,<br>
{{ config('app.name') }}
@endcomponent
<hr>
If you’re having trouble clicking the <strong>"Reset Password"</strong> button, copy and paste the URL below into your web browser:<br>
<small>{{ route('password.reset', ['token' => $token,]) . '?email=' . urlencode($token->user->email) }}</small>
@endcomponent
我越来越View [] not found. (View: /home/vagrant/Laravel/youtube/resources/views/emails/password/reset.blade.php)
真的不知道为什么。我想,我需要第二双眼睛来找出这个错误。