*/ public function toArray(Request $request): array { return [ 'id' => $this->id, 'type' => $this->type->value, 'type_label' => $this->type->label(), 'title' => $this->title, 'body' => $this->body, 'data' => $this->data, 'read_at' => $this->read_at?->toIso8601String(), 'created_at' => $this->created_at?->toIso8601String(), ]; } }