各位开发人员,我想下载多个文件作为一个 zip,但我不断收到错误
下面是我试过的代码
public function multiple($id){
$files = documents::where('claim_id', $id)->get();
if ($files != '') {
$filepath = storage_path('app/Documents/');
foreach($files as $file) {
$zipper = new \Chumper\Zipper\Zipper;
$fi = storage_path('app/Documents/'.$file->file_name);
$zipper->make($filepath.'doc.zip');
}
return response()->download($filepath.'doc.zip');
}
else{
Alert::info('Info', 'No Documents Available');
return redirect()->back();
}
}
附件是我得到的错误
慕村9548890