modelName= $modelName; } public function collection(Collection $rows) { Log::warning('匯入啟動', [ 'model' => $this->modelName, 'rows_id' =>++$this->con, 'rows_count' => $rows->count() ]); if($this->modelName=='User'){ ImportUserChunkJob::dispatch($rows,$this->con); }else{ Log::warning('未知的 modelName', ['model' => $this->modelName]); } } public function chunkSize(): int { return 1000; } public function headingRow(): int { return 1; } }