*/ public function toArray(Request $request): array { return [ 'id' => $this->id, 'platform' => $this->platform->value, 'maxContentLength' => $this->platform->maxContentLength(), 'maxImages' => $this->platform->maxImages(), 'allowedMediaTypes' => array_map(fn ($type) => $type->value, $this->platform->allowedMediaTypes()), 'supportsTextOnly' => $this->platform->supportsTextOnly(), 'requiresContent' => $this->platform->requiresContent(), 'publishConfig' => $this->platform->publishConfig(), ]; } }