- * Create a response that forces a download in the browser.
- */
- protected function downloadResponse(string $content, string $fileName): Response
- {
- return response()->make($content, 200, [
- 'Content-Type' => 'application/octet-stream',
- 'Content-Disposition' => 'attachment; filename="' . $fileName . '"'
- ]);
- }
-
- /**
- * Create a file download response that provides the file with a content-type
- * correct for the file, in a way so the browser can show the content in browser.