has('preview')) { return $invoice->getPDFData(); } return $invoice->getGeneratedPDFOrStream('invoice'); } }