Open johannesnagl opened 9 years ago
Hi @johannesnagl
POST /posts
is already supported. Depending on the handler method you implement, it can create 1 or more entities.
POST /posts/{id}/duplicate
is not a supported method from the JSON API spec. But you could spec an extension and implement your own extension of this library to support this method.
Hope that helps you just a bit?
POST /posts is already supported. Depending on the handler method you implement, it can create 1 or more entities.
I'm totally aware of this fact! creating new posts works like a charm! but we do need custom routes, as the duplicate
action. I've read in the jsonapi specs that they don't have a specific recommendation for these endpoints.
But I do think that the laravel-jsonapi plugin should provide some basic steps to allow this.
I think there's a valid point in adding the ability to make extensions to this library. I personally do not have any suggestions on how to do this at the moment, but if you have any ideas to kickstart a discussion I am very willing to take part in that +1
Hi,
is there any way we can add some custom endpoints to a specific handler?
I'm talking about
POST /posts/
for creating elementsPOST /posts/<<ID>>/duplicate
for duplicating a specific elementWhen defining a second POST-route I always end up calling the same
handlePost()
method. Is there any solution for this scenario?