You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our repositories don't always include all the CRUD actions.
e.g. we have read-only resources that only include the GET index and GET singular resource endpoints.
If I'd extend Swis\JsonApi\Client\Repository our repositories would have methods that call non-existing endpoints.
To prevent this I have created custom repositories that basically have a selection of the Swis\JsonApi\Client\Repository methods.
Possible implementation
The Swis\JsonApi\Client\Repository class consists of all the CRUD methods.
If these methods would be moved to traits and the Repository would use those, the class would work the same.
It would also enable custom repositories with just a few of these traits, without having to rewrite them.
We could then make repositories ourselves using your traits like hasIndexAction and hasDeleteAction.
The text was updated successfully, but these errors were encountered:
Detailed description
Our repositories don't always include all the CRUD actions.
e.g. we have read-only resources that only include the GET index and GET singular resource endpoints.
If I'd extend
Swis\JsonApi\Client\Repository
our repositories would have methods that call non-existing endpoints.To prevent this I have created custom repositories that basically have a selection of the
Swis\JsonApi\Client\Repository
methods.Possible implementation
The
Swis\JsonApi\Client\Repository
class consists of all the CRUD methods.If these methods would be moved to traits and the Repository would use those, the class would work the same.
It would also enable custom repositories with just a few of these traits, without having to rewrite them.
We could then make repositories ourselves using your traits like
hasIndexAction
andhasDeleteAction
.The text was updated successfully, but these errors were encountered: