title: Laravel 5.1 - how to download pdf file from S3 bucket
body: <p>I am using Laravel's Storage facade and I am able to upload the pdf to S3 and I am also able to get() its contents but I cannot display or download it to the end user as an actual pdf file. It just looks like raw data. Here is the code:</p>
  
  <pre><code>$file = Storage::disk($storageLocation)-&gt;get($urlToPDF);
  header("Content-type: application/pdf");
  header("Content-Disposition: attachment; filename='file.pdf'");
  echo $file;
  </code></pre>
  
  <p>How can this be done? I have checked several articles (and SO) and none of them have worked for me. </p>