public function getAttribute($key) { if (isset($this->attributes[$key])) { return $this->attributes[$key]; } }