0
나는 데이터베이스를 수집하고 엑셀 파일로 다운로드 할 수있는 백엔드에 사용자가 가득한 데이터베이스를 가지고있다. (Maatwebsite 사용). 동시에 관리자가이 Excel 파일로 이메일을 수신하도록합니다. 이 이메일을 이메일에 어떻게 추가합니까? 이 코드입니다 :다운로드 및 메일 엑셀 파일 Laravel
public function excel()
{
Excel::create('Participants', function($excel) {
$excel->sheet('Participants', function($sheet) {
$sheet->fromArray(Participant::where('enabled',1)->get(), null, 'A1', false, false);
});
})->download("xlsx");
Mail::raw("In attachment excelfile of participants ", function($message)
{
$message->subject('ExcelFile Participants!');
$message->from('[email protected]', 'As Adventure Contest');
$message->to('[email protected]');
//$message->attachData(, 'Participants.xlsx');
});
}