芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/kwesioben.com/paymoney/vendor/maatwebsite/excel/src/Jobs/AppendQueryToSheet.php
sheetExport = $sheetExport; $this->temporaryFile = $temporaryFile; $this->writerType = $writerType; $this->sheetIndex = $sheetIndex; $this->page = $page; $this->chunkSize = $chunkSize; } /** * Get the middleware the job should be dispatched through. * * @return array */ public function middleware() { return (method_exists($this->sheetExport, 'middleware')) ? $this->sheetExport->middleware() : []; } /** * @param Writer $writer * * @throws \PhpOffice\PhpSpreadsheet\Exception * @throws \PhpOffice\PhpSpreadsheet\Reader\Exception */ public function handle(Writer $writer) { (new LocalizeJob($this->sheetExport))->handle($this, function () use ($writer) { $writer = $writer->reopen($this->temporaryFile, $this->writerType); $sheet = $writer->getSheetByIndex($this->sheetIndex); $query = $this->sheetExport->query()->forPage($this->page, $this->chunkSize); $sheet->appendRows($query->get(), $this->sheetExport); $writer->write($this->sheetExport, $this->temporaryFile, $this->writerType); }); } }