Skip to content

Commit

Permalink
fix: only pass instance
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Taylor-Jackson committed Jan 16, 2019
1 parent 0bcc832 commit 83e9c5d
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 83e9c5d

Please sign in to comment.