We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0c7ad9 commit 88b245bCopy full SHA for 88b245b
src/Search/Searchables.php
@@ -159,7 +159,11 @@ public function fields($searchable): array
159
$transformers = $this->index->config()['transformers'] ?? [];
160
161
return collect($fields)->mapWithKeys(function ($field) use ($searchable) {
162
- $value = method_exists($searchable, $field) ? $searchable->{$field}() : $searchable->get($field);
+ if (method_exists($searchable, $field)) {
163
+ $value = $searchable->{$field}();
164
+ } else {
165
+ $value = $searchable instanceof EntryContract ? $searchable->value($field) : $searchable->get($field);
166
+ }
167
168
return [$field => $value];
169
})->flatMap(function ($value, $field) use ($transformers) {
0 commit comments