So this is pretty well documented in the library But I cannot get it to work. Consider the following:
$pdf = PDF::loadView('modules.efapreports.pdf.invoice', [
'invoiceData' => $this->collection,
'organization' => $organization,
'invoiceNumber' => $this->formFields['invoice_number'],
'invoiceDate' => $this->formFields['invoice_date'],
'dueDate' => $this->formFields['due_date'],
'payementTerms' => $this->formFields['payment_terms'],
'gst' => 1.05,
]);
$pdf->save(storage_path(
'efapinvoices/' . $this->getPath() .'/'. $this->getFileName() . $this->getExtension()
));
$pdf->download(storage_path(
'efapinvoices/' . $this->getPath() .'/'. $this->getFileName() . $this->getExtension()
));
This saves it, perfectly, but does not download it. Do I have to load the pdf file?