//下载文件标签:文件,txt,Content,header,点击,file,path,php,下载 From: https://www.cnblogs.com/2019piggy/p/17813230.html
public function download(Request $request){
$file_path = 'C:/Users/Admin/Desktop/办公材料/缓存.txt';
$file_name = '缓存.txt';
if (!file_exists($file_path)) {
echo '文件不存在';
exit();
}
header('Content-Type: application/pdf');
header('Content-Disposition: attachment; filename='.$file_name);
readfile($file_path);
}