Skip to content

Commit

Permalink
HasManyThrough::macro("unsearchable") fix (#505)
Browse files Browse the repository at this point in the history
  • Loading branch information
LastDragon-ru authored Aug 4, 2021
1 parent d3703c0 commit a3d4cc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SearchableScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ public function extend(EloquentBuilder $builder)

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

event(new ModelsImported($models));
event(new ModelsFlushed($models));
});
});
}
Expand Down

0 comments on commit a3d4cc7

Please sign in to comment.