I'm tring to download multiple PDFs using this method:
public function download(){
$documents = Documents::all();
foreach ($documents as $document) {
response()->download(public_path("/uploads/documents/".$document->filename));
}
return 1;
}
This works, but only downloads one file. The other files aren't downloaded. Why?