title = (string) $survey->title; // Beschreibung ist ein Klartextfeld; evtl. gespeicherte HTML-Tags (z. B.

) // entfernen, damit das Textarea reinen Text zeigt. $data->description = trim(strip_tags((string) $survey->description)); return $data; } /** * @return array */ public function toArray(): array { return [ 'title' => $this->title, 'description' => $this->description, ]; } }