Skip to content

Commit

Permalink
Merge pull request #79 from designmynight/fix-on-search-connection
Browse files Browse the repository at this point in the history
fix: only pass instance
  • Loading branch information
Will Taylor-Jackson authored Jan 16, 2019
2 parents 7e00eef + 83e9c5d commit 39f4274
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ public function addToIndex()
return $model->toSearchableArray();
});

return $instance->onSearchConnection(function ($docs, $instance) {
return $instance->onSearchConnection(function ($instance) use ($docs) {
$query = $instance->newQueryWithoutScopes();

return $query->insert($docs->all());
}, $docs, $instance);
}, $instance);
}
}

0 comments on commit 39f4274

Please sign in to comment.