- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 21
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
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
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request