W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
如果您已在 文件存儲 上存儲了一個文件,則可以使用 attachFromStorage
方法將其附加到電子郵件中:
/**
* 構(gòu)建消息
*
* @return $this
*/
public function build()
{
return $this->view('emails.orders.shipped')
->attachFromStorage('/path/to/file');
}
如有必要,您可以使用 attachFromStorage
方法的第二個和第三個參數(shù)指定文件的附件名稱和其他選項:
/**
* 構(gòu)建消息
*
* @return $this
*/
public function build()
{
return $this->view('emails.orders.shipped')
->attachFromStorage('/path/to/file', 'name.pdf', [
'mime' => 'application/pdf'
]);
}
如果需要指定默認(rèn)磁盤以外的存儲磁盤,可以使用 attachFromStorageDisk
方法:
/**
* 構(gòu)建消息
*
* @return $this
*/
public function build()
{
return $this->view('emails.orders.shipped')
->attachFromStorageDisk('s3', '/path/to/file');
}
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: