src/Pagination/CursorBuilder.php
protected function getColumnValue($id)
    {
        $value = $this
            ->getQuery() // we want the raw DB value, not the Model value as that can be mutated.
            ->where($this->key, $id)
            ->value($this->column);

        if (is_null($value)) {
            throw new \OutOfRangeException("Cursor key {$id} does not exist or has a null value.");
        }

        return $value;
    }
protected function getColumnValue($id)
    {
        $value = $this
            ->getQuery() // we want the raw DB value, not the Model value as that can be mutated.
            ->where($this->key, $id)
            ->value($this->column);

        if (is_null($value)) {
            throw new \OutOfRangeException("Cursor key {$id} does not exist or has a null value.");
        }

        return $value;
    }
Get the column value for the provided id.

@param $id
@return mixed
@throws \OutOfRangeException
if the id does not exist.