reportService = $reportService; $this->exportService = $exportService; } public function loadReportData(): void { $this->trialBalanceReport = $this->reportService->buildTrialBalanceReport($this->startDate, $this->endDate); } public function form(Form $form): Form { return $form ->schema([ Split::make([ $this->getDateRangeFormComponent(), $this->getStartDateFormComponent(), $this->getEndDateFormComponent(), ])->live(), ]); } public function exportCSV(): StreamedResponse { $transformer = new TrialBalanceReportTransformer($this->trialBalanceReport); return $this->exportService->exportToCsv($this->company, $transformer, $this->startDate, $this->endDate); } public function exportPDF(): StreamedResponse { $transformer = new TrialBalanceReportTransformer($this->trialBalanceReport); return $this->exportService->exportToPdf($this->company, $transformer, $this->startDate, $this->endDate); } }