Skip to content

Commit 54eae28

Browse files
authoredFeb 2, 2024
Update Searching.php
1 parent 7dccd85 commit 54eae28

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎src/Concerns/Searching.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ public function setSearchable(array|string $values, bool $safe = false): static
4141
}
4242

4343
foreach ($values as $key => $value) {
44-
if ($safe === true && isset($this->searchable[$key])) {
45-
continue;
44+
if ($safe === true) {
45+
if (isset($this->searchable[$key]) || array_search($key, $this->searchable) !== false) {
46+
continue;
47+
}
4648
}
4749

4850
$this->searchable[$key] = $value;

0 commit comments

Comments
 (0)