resource = $resource; } public function jsonSerialize(): array { return [ 'id' => $this->resource->id, ]; } }