Windows IE11 でも文字化けしないようにutf-8 エンコードします。
$content に データを入れておきます。mime_type も取得しておきます。
$disk = \Storage::disk('local');
$file_path = 'tmp/myfile.pdf';
$content = $disk->get( $file_path );
$mime_type = $disk->mimeType( $file_path );
日本語ファイル名をセットしてダウンロードさせます。
$filename = '日本語pdfファイル名.pdf';
$headers = [
'Content-Type' => 'application/pdf',
'Content-Disposition' => 'attachment; filename*=UTF-8\'\''.rawurlencode($filename)
];
return \Response::make($content, 200, $headers);
$content に データを入れます
$content = <<< DOC_END
==================================
テキスト内容
==================================
DOC_END;
$filename = 'サンプルテキスト.txt';
$headers = [
'Content-type' => 'text/plain',
'Content-Disposition' => sprintf('attachment; filename="%s"', $filename),
];
return \Response::make($content, 200, $headers);