mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-29 17:34:09 +00:00
Export pdf file from Laravel Vapor through S3 bucket (code sync from exchange-2.0)
This commit is contained in:
@@ -27,7 +27,7 @@ class ExportCustomersToExcelController
|
||||
$exportFileName = 'nullDebtor.xlsx';
|
||||
$filesystemDriver = Storage::getDefaultDriver();
|
||||
if($filesystemDriver === 's3'){
|
||||
return response([ 'src' => AWSS3Helper::S3($exportFileName, $exportsNullDebtors) ]);
|
||||
return response([ 'src' => AWSS3Helper::S3Exportable($exportFileName, $exportsNullDebtors) ]);
|
||||
}
|
||||
else{
|
||||
$response = $exportsNullDebtors->download('nullDebtor.xls', Excel::XLS, ['Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
|
||||
@@ -41,7 +41,7 @@ class ExportCustomersToExcelController
|
||||
$exportFileName = 'payment-transactions.xls';
|
||||
$filesystemDriver = Storage::getDefaultDriver();
|
||||
if($filesystemDriver === 's3'){
|
||||
return response([ 'src' => AWSS3Helper::S3($exportFileName, $exportsTransactions) ]);
|
||||
return response([ 'src' => AWSS3Helper::S3Exportable($exportFileName, $exportsTransactions) ]);
|
||||
}
|
||||
else{
|
||||
$response = $exportsTransactions->download($exportFileName, Excel::XLS, ['Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
|
||||
@@ -55,7 +55,7 @@ class ExportCustomersToExcelController
|
||||
$exportFileName = 'total-orders-' . $request->route('year') . '.xls';
|
||||
$filesystemDriver = Storage::getDefaultDriver();
|
||||
if($filesystemDriver === 's3'){
|
||||
return response([ 'src' => AWSS3Helper::S3($exportFileName, $exportsTotalOrders) ]);
|
||||
return response([ 'src' => AWSS3Helper::S3Exportable($exportFileName, $exportsTotalOrders) ]);
|
||||
}
|
||||
else{
|
||||
$response = $exportsTotalOrders->download($exportFileName, Excel::XLS, ['Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
|
||||
|
||||
Reference in New Issue
Block a user