/** * Magic method to return the meta data like the post original fields * * @param string $key * @return string */ public function __get($key) { if (!isset($this->{$key})) { if (isset($this->term->{$key})) { return $this->term->{$key}; } } return parent::__get($key); }
public function save(array $options = array()) { if (isset($this->attributes[$this->primaryKey])) { $this->meta->save($this->attributes[$this->primaryKey]); } return parent::save($options); }