我正在尝试在php laravel上传一个csv文件 但是我收到错误,无法打开文件进行阅读。
这是我的邮件代码
public function sendReports($to,$emailId,$filePath)
{
$this->recepient = $to;
$data = [
"emailId" => $emailId,
"filePath" => $filePath
];
Mail::send('emails.sendReports',$data, function($message) use ($filePath)
{
$message->from('$this->recepien');
$message->to($this->recepient)->subject('PMS Forgot Password');
$message->attach($filePath);
});
}