Open
Description
For implementing behavior not defined by the spec.
Something like:
$type->resourceAction('publish', function ($model, Context $context) {
$model->publish();
return $model;
})
->authorized(...);
$type->collectionAction('purge', function (Context $context) {
Post::delete();
return new Response(204);
})
->method('delete')
->authorized(...);
Call via:
POST /api/posts/1/actions/publish
DELETE /api/posts/actions/purge