-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Top level Meta for Collection #16
Comments
Hey, just a heads up I'll be merging support for this shortly! |
This is the exact API that will land in v1. Docs are being written at the moment. Thanks Sam. |
hi @timacdonald is this possible today? can not see on docs, thank you |
currently this way works return ItemResource::collection(
// ...
)
->additional([ // << -----
'meta' => [
'test_key' => 'test_value',
],
]); "meta": {
// ...
"test_key": "test_value"
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Even though this is specifically in the To Do section, I'm making an issue for it to bump the urgency of it as I need it to pass back some additional data.
I am imagining an API that looks something like this:
Resource::collection($data)->withMeta($meta)
Again, if @timacdonald has a specific implementation in mind, let me know. If it sounds good in theory, I can try to take a stab at it.
The text was updated successfully, but these errors were encountered: