Level 13
basename() expects parameter 1 to be string, object given
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
try to mail send when file csv file export
$file = Excel::download(new UsersExport, 'Sales Register 2019 Cr.xlsx');
$data = array('name'=>"byte and bits");
\Mail::send('front.mail', $data, function($message) use($file){
$message->to('[email protected]')
->subject('Sales Register 2019 Excelsheet');
$message->from('[email protected]','byte and bits');
$message->attach($file);
});
User::truncate();
return $file;
Please or to participate in this conversation.