protected function reorderPositionsOnItemsBetween($positionBefore, $positionAfter, $ignoreId = null)
    {
        if ($positionBefore == $positionAfter) {
            return;
        }

        $query = $this->listifyScopedQuery();

        if ($ignoreId) {
            $query->where($this->getPrimaryKey(), '!=', $ignoreId);
        }

        if ($positionBefore < $positionAfter) {
            // increment the in-between positions

            $query
                ->where($this->positionColumn(), '>', $positionBefore)
                ->where($this->positionColumn(), '<=', $positionAfter)
                ->decrement($this->positionColumn());

        } else {
            // decrement the in-between positions

            $query
                ->where($this->positionColumn(), '>=', $positionAfter)
                ->where($this->positionColumn(), '<', $positionBefore)
                ->increment($this->positionColumn());
        }
    }