public function getAttribute($key) { $attribute = $this->tag->getAttribute($key); if (!is_null($attribute)) { $attribute = $attribute['value']; } return $attribute; }