filename(); $filepath = ReportStorage::customFilepath($this->study, $filename); if (ReportStorage::exists($this->study, $filename)) { return $filepath; } $data = ['report' => $this->report, 'title' => 'PDF VIEW']; Pdf::loadView('staff.reports.viewer.html-report', $data) ->setPaper('a4', 'landscape') ->setWarnings(false) ->save(ReportStorage::abspath($filepath)); return $filepath; } protected function getExtension(): string { return ExportFormat::Pdf->value; } }