public function hasChanged($name)
    {
        if ($this->hasOldAttribute($name) && $this->hasNewAttribute($name)) {
            return $this->getOldAttribute($name) != $this->getNewAttribute($name);
        } else {
            // Unknown attribute
        }
    }
public function hasChanged($name)
    {
        if ($this->hasOldAttribute($name) && $this->hasNewAttribute($name)) {
            return $this->getOldAttribute($name) != $this->getNewAttribute($name);
        } else {
            // Unknown attribute
        }
    }
public function hasChanged ( $ name ) { if ( $ this -> hasOldAttribute ( $ name ) && $ this -> hasNewAttribute ( $ name ) ) { return $ this -> getOldAttribute ( $ name ) != $ this -> getNewAttribute ( $ name ) ; } else { // Unknown attribute } }
Determines whether attribute has been changed or not

@param string $name Attribute name
@return boolean
Determines whether attribute has been changed or not