aToUsers = $aToUsers; } /** * Build the message. * * @return $this */ public function build() { // 收件人 $this->to($this->aToUsers); // 抄送人 $this->cc(['411693135@qq.com']); // 密送人 $this->bcc(['411693135@qq.com']); // 附件 使用绝对路径 // $this->attach('D:\phpstudy_pro\WWW\video_system\public\1.docx'); /** * storage 路径添加附件 * 默认 storage/app 路径前缀,补足后面的路径即可 * 前缀具体看 app/config/filesystems.php 中 local.root 的配置 */ $this->attachFromStorage('public/2.docx'); return $this->view('mail-msg'); } }