public function setPasswordAttribute($value)
    {
        if (strlen($value)) {
            $this->attributes['password'] = Hash::make($value);
            if ($this->id) {
                activity()->on($this)->log(ActivityLog::ACTION_UPDATED_PASSWORD);
            }
        }
    }
public function setPasswordAttribute($value)
    {
        if (strlen($value)) {
            $this->attributes['password'] = Hash::make($value);
            if ($this->id) {
                activity()->on($this)->log(ActivityLog::ACTION_UPDATED_PASSWORD);
            }
        }
    }
public function setPasswordAttribute ( $ value ) { if ( strlen ( $ value ) ) { $ this -> attributes [ 'password' ] = Hash :: make ( $ value ) ; if ( $ this -> id ) { activity ( ) -> on ( $ this ) -> log ( ActivityLog :: ACTION_UPDATED_PASSWORD ) ; } } }
Automatically creates hash for the user password.

@param  string $value
@return void
Automatically creates hash for the user password .