result->data; } /** * Returns the collection of resources as a JSON string. */ public function jsonSerialize(): array { return $this->toArray(); } /** * Returns the collection of resources. */ public function paginate(): Result { return $this->result; } /** * Returns the Resource based on the ID. */ abstract public function find(string $id): ?BaseResource; }