getContent

Learn how to read the resolved content of the slot.

This method gives you the resolved content of the slot. The structure depends on the schema of the slot.

Signature

This method has the following signature:

public function getContent(): mixed

This method returns the resolved content of the slot.

Example

Here is a basic example of how to use this method:

<?phpuse Croct\Plug\Croct;
$croct = Croct::fromDotenv();$response = $croct->fetchContent('home-banner');$content = $response->getContent();