In laravel Nova 2.0
To initiate a file download after the action is executed, you may use the Action::download method. The download method accepts the URL of the file to be downloaded as its first argument, and the desired name of the file as its second argument:
return Action::download('https://example.com/invoice.pdf', 'Invoice.pdf');
in Action handle method
public function handle(ActionFields $fields, Collection $models)
{
foreach ( $models as $model ) {
return Action::download($model->document_link, $model->document_title);
}
}
now this will download the last one in loop, how to allow download all in the loop?
Update
One option will be using Zipper or something to create zip of all the downloadable files selected and then download it, but I would like it if we can allow a queue of downloads.