json-api-server/docs/show.md

346 B

Showing Resources

For each resource type, a GET /{type}/{id} endpoint is exposed to show an individual resource.

Events

onShow

Run after models and relationships have been retrieved, but before they are serialized into a JSON:API document.

$type->onShow(function (&$model, Context $context) {
    // do something
});