public function toArray() { foreach ($this->appends as $field) { $result[$field] = $this[$field]; } return $result; }