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 ;
@@ -71,7 +73,10 @@ public function update(array $values, array $options = [])
71
73
return 1 ;
72
74
}
73
75
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 );
75
80
}
76
81
77
82
/** @inheritdoc */
You can’t perform that action at this time.
0 commit comments