title: Laravel 5 Force Download a pdf File
body: <p><strong>Edited</strong> <br>
  i want to Force Download a pdf File in laravel 5.
  in laravel 4 i used the following code:</p>
  <pre><code>        $file= public_path(). &quot;/site-docs/cv.pdf&quot;;
      $headers = array(
          'Content-Type: application/pdf',
          'Content-Disposition:attachment; filename=&quot;cv.pdf&quot;',
          'Content-Transfer-Encoding:binary',
          'Content-Length:'.filesize($file),
      );
      return \Response::download($file,&quot;Ahmed Badawy - CV.pdf&quot;, $headers);
  </code></pre>
  <p>but in laravel 5 that doesn't work.it comes out with this error:</p>
  <pre><code>Unable to guess the mime type as no guessers are available (Did you enable the php_fileinfo extension?)
  </code></pre>
  <p>also i tried this:</p>
  <pre><code>return response()-&gt;download($file);
  </code></pre>
  <p>same error apeared...
  what can i do to force a download in laravel 5.</p>
  <h2><strong>I Solved it- Answer is:</strong></h2>
  <p>it was a server thing. thanks any way.
  you just enable this extension: php_fileinfo.dll in the php.ini file.
  then restart the server.</p>