File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 88use Illuminate \Database \Eloquent \Builder as EloquentBuilder ;
99use MongoDB \Driver \Cursor ;
1010use MongoDB \Laravel \Helpers \QueriesRelationships ;
11+ use MongoDB \Laravel \Query \Builder as MongoDBQueryBuilder ;
1112use MongoDB \Model \BSONDocument ;
1213
1314use function array_key_exists ;
1415use function array_merge ;
16+ use function assert ;
1517use function collect ;
1618use function is_array ;
1719use function iterator_to_array ;
@@ -62,7 +64,10 @@ public function update(array $values, array $options = [])
6264 return 1 ;
6365 }
6466
65- return $ this ->toBase ()->update ($ this ->addUpdatedAtColumn ($ values ), $ options );
67+ $ builder = $ this ->toBase ();
68+ assert ($ builder instanceof MongoDBQueryBuilder);
69+
70+ return $ builder ->update ($ this ->addUpdatedAtColumn ($ values ), $ options );
6671 }
6772
6873 /** @inheritdoc */
You can’t perform that action at this time.
0 commit comments