public function rankRemove()
    {
        $owner = $this->owner;
        $query = $this->getSiblings()->andWhere(['>', $this->attribute, $this->owner->getAttribute($this->attribute)]);
        $owner::updateAllCounters(
            [$this->attribute => -1],
            $query->where
        );
    }
public function rankRemove()
    {
        $owner = $this->owner;
        $query = $this->getSiblings()->andWhere(['>', $this->attribute, $this->owner->getAttribute($this->attribute)]);
        $owner::updateAllCounters(
            [$this->attribute => -1],
            $query->where
        );
    }
public function rankRemove ( ) { $ owner = $ this -> owner ; $ query = $ this -> getSiblings ( ) -> andWhere ( [ '>' , $ this -> attribute , $ this -> owner -> getAttribute ( $ this -> attribute ) ] ) ; $ owner :: updateAllCounters ( [ $ this -> attribute => - 1 ] , $ query -> where ) ; }
Updates siblings ranks after owner model is deleted
Updates siblings ranks after owner model is deleted