From 1d33f5b8befe3ee61e075f004622bef806e16e5e Mon Sep 17 00:00:00 2001 From: Andrew Clinton Date: Tue, 17 Dec 2024 15:28:34 -0500 Subject: [PATCH] Update status filter https://statamic.dev/upgrade-guide/4-to-5#entries-may-now-only-be-queried-by-a-single-status --- src/Events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Events.php b/src/Events.php index c95bd1d..d638918 100644 --- a/src/Events.php +++ b/src/Events.php @@ -150,7 +150,7 @@ private function entries(): self fn ($query, $id) => $query->where('id', $id), fn ($query) => $query->where('collection', $this->collection) )->where('site', $this->site ?? Site::current()->handle()) - ->where('status', 'published') + ->whereStatus('published') ->when($this->terms, fn ($query, $terms) => $query->whereTaxonomyIn($terms)); collect($this->filters)->each(function ($value, $fieldCondition) use ($query) {