public function rankAdd()
    {
        if (!$this->owner->isNewRecord) {
            return;
        }
        if (!is_numeric($this->owner->getAttribute($this->attribute))) {
            $this->owner->setAttribute($this->attribute, $this->getSiblings()->count());
        }
    }
public function rankAdd()
    {
        if (!$this->owner->isNewRecord) {
            return;
        }
        if (!is_numeric($this->owner->getAttribute($this->attribute))) {
            $this->owner->setAttribute($this->attribute, $this->getSiblings()->count());
        }
    }
public function rankAdd ( ) { if ( ! $ this -> owner -> isNewRecord ) { return ; } if ( ! is_numeric ( $ this -> owner -> getAttribute ( $ this -> attribute ) ) ) { $ this -> owner -> setAttribute ( $ this -> attribute , $ this -> getSiblings ( ) -> count ( ) ) ; } }
Adds inserts rank into new model
Adds inserts rank into new model