listsPackingListProcessor = $listsPackingListProcessor; } protected function notification():array { return []; } public function logic(Request $request) : JsonResponse { $params = $request->all(); $packingLists = $this->listsPackingListProcessor->execute($params); $excelExportLogic = new ExportExcelLogic(collect($packingLists)); $this->excelExportLogic = $excelExportLogic; return response()->json(['success' => true]); } public function getExcelCollection(){ return $this->excelExportLogic; } }