Merge branch 'dillon/34.4-jenkins-vapor' into vapor/development

This commit is contained in:
Dillon Ngo
2024-06-17 11:26:27 +08:00
@@ -65,11 +65,11 @@ class ExportCustomersToExcelController
if (!file_exists($exportDirectory)) {
mkdir($exportDirectory, 0755, true);
}
$localPath = $exportDirectory . '/' . $exportFileName;
// $localPath = $exportDirectory . '/' . $exportFileName;
$response = $exportsTransactions->download($exportFileName, Excel::XLS, ['Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
file_put_contents($localPath, $response);
return response()->file($localPath, ['Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
// file_put_contents($localPath, $response);
return response()->file($response->getFile()->getPathname(), ['Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
}
else{
$response = $exportsTransactions->download($exportFileName, Excel::XLS, ['Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);