How to query collection entries that have a Replicator block type? #8189
Answered
by
ryanmitchell
aaronbushnell
asked this question in
Q&A
-
I'm a bit stuck trying to query all entries that have a particular Replicator block type. Here's what I've tried: Statamic\Facades\Entry::query()
->where('blocks->type', 'hero')
->get(); Which should yield at least one entry (a handful have a "Hero" block), but I'm getting no results. Am I possibly querying this incorrectly? |
Beta Was this translation helpful? Give feedback.
Answered by
ryanmitchell
May 28, 2023
Replies: 1 comment 3 replies
-
Currently you have to query by index... eg |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
aaronbushnell
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently you have to query by index... eg
->where('blocks->0->type', 'hero')
.