Skip to content

Commit

Permalink
Add option to use Campaign and Banner UUIDs in the search box
Browse files Browse the repository at this point in the history
  • Loading branch information
rootpd committed Sep 20, 2024
1 parent 99d2cc7 commit 790b4b9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

- Fixed missing session source on showtime requests which got executed before the session source could be stored. remp/web#2656
- Fixed campaign-module migrations by moving country seeder into campaign-module. remp/remp#1287
- Added option to use Campaign and Banner UUIDs in the search box.

### [Mailer]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public function getResults(string $term): Collection
{
return Banner::query()
->where('name', 'LIKE', "%{$term}%")
->orWhere('uuid', $term)
->orWhere('public_id', $term)
->orderBy('updated_at', 'DESC')
->take(config('search.maxResultCount'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public function getResults(string $term): Collection
{
return Campaign::query()
->where('name', 'LIKE', "%{$term}%")
->orWhere('uuid', $term)
->orWhere('public_id', $term)
->orWhereHas('banners', function ($query) use ($term) {
$query->where('name', 'LIKE', "%{$term}%");
Expand Down

0 comments on commit 790b4b9

Please sign in to comment.