Skip to content

Commit a3d4cc7

Browse files
HasManyThrough::macro('unsearchable') fix (#505)
1 parent d3703c0 commit a3d4cc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/SearchableScope.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ public function extend(EloquentBuilder $builder)
5757

5858
HasManyThrough::macro('unsearchable', function ($chunk = null) {
5959
$this->chunkById($chunk ?: config('scout.chunk.searchable', 500), function ($models) {
60-
$models->filter->shouldBeSearchable()->searchable();
60+
$models->unsearchable();
6161

62-
event(new ModelsImported($models));
62+
event(new ModelsFlushed($models));
6363
});
6464
});
6565
}

0 commit comments

Comments
 (0)