Skip to content

Commit 127a5c2

Browse files
committed
fixes
1 parent 14dea92 commit 127a5c2

File tree

2 files changed

+11
-41
lines changed

2 files changed

+11
-41
lines changed

src/Fields/MorphTo.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,17 @@ public function resolveRelatableQuery(Request $request, Model $model): Builder
118118
return parent::resolveRelatableQuery($request, $model);
119119
}
120120

121+
/**
122+
* {@inheritdoc}
123+
*/
124+
public function getSearchableColumns(): array
125+
{
126+
return match (true) {
127+
array_is_list($this->searchableColumns) => array_fill_keys($this->types, $this->searchableColumns),
128+
default => $this->searchableColumns,
129+
};
130+
}
131+
121132
/**
122133
* Map the async searchable fields.
123134
*/

tests/Http/MorphToControllerTest.php

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)