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 8
8
use Illuminate \Database \Eloquent \Builder as EloquentBuilder ;
9
9
use MongoDB \Driver \Cursor ;
10
10
use MongoDB \Laravel \Helpers \QueriesRelationships ;
11
+ use MongoDB \Laravel \Query \Builder as MongoDBQueryBuilder ;
11
12
use MongoDB \Model \BSONDocument ;
12
13
13
14
use function array_key_exists ;
14
15
use function array_merge ;
16
+ use function assert ;
15
17
use function collect ;
16
18
use function is_array ;
17
19
use function iterator_to_array ;
@@ -62,7 +64,10 @@ public function update(array $values, array $options = [])
62
64
return 1 ;
63
65
}
64
66
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 );
66
71
}
67
72
68
73
/** @inheritdoc */
You can’t perform that action at this time.
0 commit comments