php - Markdown 邮件和视图:缓存导致错误“/resources/views/vendor/mail/text”目录不存在
问题描述
view:cache
当我在发送通知邮件后尝试时出现错误:
“资源/视图/供应商/邮件/文本”目录不存在。
哪个是正确的,因为它不存在但它不是必需的?
\App\Models\User::find($user_id)->notify(new \App\Notifications\InvoicePaid());
Artisan::call('view:cache');
用户模型具有 Notifiable trait。InvoicePaid 是通过“邮件”的标准通知。
跟踪这个进一步的 Markdown 类会为邮件添加一个命名空间,但为什么它需要 vendor/mail/text 目录?
public function render($view, array $data = [], $inliner = null)
{
$this->view->flushFinderCache();
$contents = $this->view->replaceNamespace(
'mail', $this->htmlComponentPaths()
)->make($view, $data)->render();
if ($this->view->exists($customTheme = Str::start($this->theme, 'mail.'))) {
$theme = $customTheme;
} else {
$theme = Str::contains($this->theme, '::')
? $this->theme
: 'mail::themes.'.$this->theme;
}
return new HtmlString(($inliner ?: new CssToInlineStyles)->convert(
$contents, $this->view->make($theme, $data)->render()
));
}
解决方案
推荐阅读
- matlab - 在 MATLAB 中分离图像中的重叠边缘以获得准确的计数
- python - 使用 colab 和 windows 10,以及 chrome 版本 64b 和 chrome 驱动程序 32b,我更改了所有路径选项,但结果与以下相同
- javascript - 使用 NodeJS 加密进行 Java 解密
填充和 oepHash - flutter - Flutter:Flutter web 中容器内的滚动条
- reactjs - 如何根据用户身份验证在反应路由器中显示不同的导航栏?
- sql-server - 将 2008 ssis 转换为 2019 - 包配置在调试中不起作用
- c# - 如何返回列表中的值在表嵌套记录中不存在的结果,从表中返回出现和缺失值
- javascript - Javascript 读取文件 + 转换为 Base64 等待结果未定义
- c# - 如何在 CSV Helper 中有一个列在 c# 中接受逗号(,)
- r - 使用字典定义更新包含英语单词/词汇表(tsv 文件)的表