From d6f0d09787d6106d915d9ae71fd2ba833cbb6cac Mon Sep 17 00:00:00 2001 From: Geoff Maddock Date: Wed, 8 Jan 2025 04:32:32 +0000 Subject: [PATCH] Modified event filter --- app/Filters/EventFilters.php | 2 +- app/Http/Resources/EntityResource.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Filters/EventFilters.php b/app/Filters/EventFilters.php index e8483680..05d9478b 100644 --- a/app/Filters/EventFilters.php +++ b/app/Filters/EventFilters.php @@ -19,7 +19,7 @@ public function venue(?string $value = null): Builder { if (isset($value)) { return $this->builder->whereHas('venue', function ($q) use ($value) { - $q->where('name', '=', ucfirst($value)); + $q->where('name','like', '%'.$value.'%'); }); } else { return $this->builder; diff --git a/app/Http/Resources/EntityResource.php b/app/Http/Resources/EntityResource.php index 7e2d332c..548de8ae 100644 --- a/app/Http/Resources/EntityResource.php +++ b/app/Http/Resources/EntityResource.php @@ -38,6 +38,7 @@ public function toArray($request) 'updated_at' => $this->updated_at, 'primary_photo' => $this->getPrimaryPhotoPath(), 'primary_photo_thumbnail' => $this->getPrimaryPhotoThumbnailPath(), + 'primary_location' => $this->getPrimaryLocation(), ]; } }