diff --git a/app/Http/Controllers/Reports/ReportExportController.php b/app/Http/Controllers/Reports/ReportExportController.php new file mode 100644 index 0000000000..bb936668bc --- /dev/null +++ b/app/Http/Controllers/Reports/ReportExportController.php @@ -0,0 +1,56 @@ +json(['message' => 'Still working.....'], 409); + } + + if($report) { + + Cache::forget($hash); + + $headers = [ + 'Content-Disposition' => 'attachment', + 'Content-Type' => 'text/csv', + ]; + + return response()->streamDownload(function () use ($report) { + echo $report; + }, $this->filename, $headers); + + } + + + } +}