【发布时间】:2020-08-09 18:20:25
【问题描述】:
最近我正在尝试从本地存储发送带有附件的电子邮件。
文件放在storage/app/reservation/this-is.pdf下
这是我的邮件
public function build()
{
return $this->markdown('email.reservation_info')
->subject('Your Hotel Reservation')
->attachFromStorage($this->pdfPath,$this->pdfName,[
'mime' => 'application/pdf'
])
->with([
'result' => $this->result
]);
}
作为上面的代码,我输入了 pdf 路径以及 pdf 名称。但我遇到了这样的错误
Illuminate\Contracts\Filesystem\FileNotFoundException
/Applications/XAMPP/xamppfiles/htdocs/kema/storage/app/reservation/DEV2008070001.pdf
我也尝试检查文件是否存在,但是当我检查文件是否已经存在时。
你能帮帮我吗?
【问题讨论】:
标签: laravel