While using laravel 5
use this code as you don`t need headers.
return response()->download($pathToFile);
.
If you are using Fileentry
you can use below function for downloading.
// download file
public function download($fileId){
$entry = Fileentry::where('file_id', '=', $fileId)->firstOrFail();
$pathToFile=storage_path()."/app/".$entry->filename;
return response()->download($pathToFile);
}