You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is the way you can patch this. $report = '/path/to/report.pdf'; if (! file_exists ($report)) { abort (404); } $filename = $this->getFileName($report_source->file).'pdf'; // if it was generated I get the contents $file = file_get_contents ($report); // delete the generated file, because we will send the content to the browser unlink ($report); // return the content to the browser that will open the PDF return Response::make($file, 200, [ 'Content-Type' => 'application/pdf', 'Content-Disposition' => 'inline; filename="'.$filename.'"' ]);
Let the person choose to download the pdf or not. The example given is saving the generated pdf to the $output path.
The text was updated successfully, but these errors were encountered: