title: force download file with laravel
body: <p>So i'm using Laravel 5 and I tried to force download a selected file but nothing happens.</p>
  
  <pre><code>public function downloadUserFile(){
          $result = $_POST['filename'];
          $entry = File::where('filename', $result)-&gt;firstOrFail();
          $file = Storage::disk()-&gt;get($entry-&gt;filePath);
          $headers = array('Content-Type' =&gt; $entry-&gt;mimetype);
          return response()-&gt;download(storage_path($entry-&gt;filePath), $result, $headers);
  }
  </code></pre>
  
  <p>and the response headers seem to be ok</p>
  
  <pre><code>Accept-Ranges: none
  Cache-Control: public
  Connection: Keep-Alive
  Content-Disposition: attachment; filename="SIGNAL - Nadezdata.mp3"
  Content-Length: 4205059
  Content-Type: audio/mpeg
  </code></pre>
  
  <p>Do you know what's wrong?</p>