このコードは、ブラウザを127.0.0.1/load/filesで開くと正しく動作します。Laravel 5複数のファイルをダウンロード
Route::get('/load/files','[email protected]_file');
routes.phpの (自動ダウンロードファイル)
ABCController.php
namespace App\Http\Controllers;
use Response;
use File;
function download_file(){
return Response::download(public_path() . "/files/file_1.txt");
}
私は同時にダウンロード2ファイルのための1つのルートと1つの機能を使用することができます?など
function download_file(){
return Response::download(["file_1.txt","file_2.txt"]); //this code not right
}
ありがとうございます。
は、あなたがウェブ上の任意のページにそのような行動を見ましたを参照してください? –