繁体   English   中英

找不到通过laravel 5.4发送电子邮件的视图

[英]View not found for sending email with laravel 5.4

我正在尝试使用Laravel(5.4)发送电子邮件,但仍然收到此错误:

FileViewFinder.php第137行中的InvalidArgumentException:
查看未找到[mails.forgot]。


在FileViewFinder-> findInPaths('mails.forgot',array('{my app dir} / resources / views'))
在FileViewFinder.php第79行
在FileViewFinder-> find('mails.forgot')
在Factory.php第128行
在Factory-> make('mails.forgot',array('emailAddress'=> null,'connection'=> null,'queue'=> null,'delay'=> null,'message'=> object(消息)))
在Mailer.php第286行中

resources/views/mails/forgot.blade.php添加了文件

在控制器中:

Mail::to('test@gmail.com')->send(new ForgotEmail());

在邮件文件(Mail / ForgotEmail.php)中,我调用:

return $this->view('mails.forgot');

在我的其他应用程序中,视图均正常运行。

通过发出php artisan cache:clearphp artisan config:cache清理Laravelscaché,看看是否可行...

在我的特定情况下,我的模板文件user.new.blade.php

这行不通。 我将其重命名为usernew.blade.php ,现在可以使用了。 似乎文件名中不能有多余的点

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM