/** * {@inheritdoc} */ public function batch(Closure $processor, $batchSize = 1000, $offsetStart = 0, $offsetEnd = null) { if (empty($this->orderings)) { $this->ascending($this->model->getPrimaryKey()); } parent::batch($processor, $batchSize, $offsetStart, $offsetEnd); }
/** * Sets the criterion used when lazy loading related records. * * @access protected */ protected function lazyCriterion() { $this->where($this->getForeignKey(), '=', $this->parent->getPrimaryKeyValue()); }