-
-
Notifications
You must be signed in to change notification settings - Fork 530
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
[5.x] Add Form submissions query builder / facade #6455
Merged
jasonvarga
merged 50 commits into
statamic:master
from
ryanmitchell:feature/submissions-query-builder
Apr 5, 2024
Merged
[5.x] Add Form submissions query builder / facade #6455
jasonvarga
merged 50 commits into
statamic:master
from
ryanmitchell:feature/submissions-query-builder
Apr 5, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I've left date tests in, but skipped, we should revisit
Haha writing the code is quick. Making the tests work not so quick. |
ryanmitchell
changed the title
Add Form submissions query builder / facade
[4.x] Add Form submissions query builder / facade
Jun 23, 2023
duncanmcclean
changed the title
[4.x] Add Form submissions query builder / facade
[5.x] Add Form submissions query builder / facade
Apr 3, 2024
jasonvarga
approved these changes
Apr 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As mentioned here: #6446 (reply in thread)
This PR adds facade support for Form submissions so you can programatically retrieve submissions, eg.
The larger detail is that I've made a new stache store for form submissions, added a new repository, and added a submission query builder. The Form facade could and should probably be updated to use these going forward (?).
Still to do:
A question for the core team is whether we should also provide adate()
method on Submission::class, as it would be a very obvious use case that people would want to query for submissions between certain dates. It can be pulled from the file name anyway, so its just a case of making the date available to the class and therefore the query builder.Edit: it always helps to look through the code properly -
date()
was already there, so I've made it possible to query by date by adding a Date index.