conditionIndex = $conditionIndex; } public function lastKey() { $after = $this->last(); if (empty($after)) { return null; } $afterKey = $after->getKeys(); $attributes = $this->conditionIndex ? $this->conditionIndex->columns() : []; foreach ($attributes as $attribute) { $afterKey[$attribute] = $after->getAttribute($attribute); } return $afterKey; } }