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 ;
@@ -71,7 +73,10 @@ public function update(array $values, array $options = [])
7173 return 1 ;
7274 }
7375
74- return $ this ->toBase ()->update ($ this ->addUpdatedAtColumn ($ values ), $ options );
76+ $ builder = $ this ->toBase ();
77+ assert ($ builder instanceof MongoDBQueryBuilder);
78+
79+ return $ builder ->update ($ this ->addUpdatedAtColumn ($ values ), $ options );
7580 }
7681
7782 /** @inheritdoc */
You can’t perform that action at this time.
0 commit comments