php - 没有为 [mail] Laravel 8 定义提示路径
问题描述
在我的 Laravel 项目中,我正在尝试使用电子邮件发件人,并且我在队列中使用 Mailable 和作业,并且工作正常,但现在我正在尝试使用降价发送电子邮件,并且由于某种原因无法正常工作 bcs 这个错误: “没有为 [mail] 定义提示路径”
在可邮寄:
{
use Queueable, SerializesModels;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->markdown('emails.orders.shipped',['url'=>'www.google.com']);
}
}
这是刀片视图,它是 Laravel 文档的默认示例:
@component('mail::message')
# Introduction
The body of your message.
@component('mail::button', ['url' => $url])
Button Text
@endcomponent
Thanks,<br>
@endcomponent
我需要传递一个将成为字符串的 url。
解决方案
我试过这个脚本它工作正常可能是缓存的问题你可以试试这个命令
php artisan optimize:clear
推荐阅读
- spring-boot - Sprint Data JPA - save() 方法在表中插入重复项
- python - 我应该如何更改“urlpatterns”中的路径?
- node.js - 我保存了从响应中获得的音频文件,但它不播放
- html - 在移动屏幕上,我的 div 显示了不需要的白色边框
- javascript - Daterangepicker 如何获取预定义日期范围的值
- arrays - 在ant design table中使用多维数组
- c# - UWP SQLite 并发说明
- async-await - 条带检索客户方法是返回客户还是将其传递给回调?
- javascript - 运行 python 应用程序的最简单方法是从 Web 应用程序接收数据,处理/操作它,然后将其推回前端
- python - Pycharm 失去了视图和模板之间的连接