File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ public function __construct(array $config)
71
71
$ this ->database = $ this ->getDefaultDatabaseName ($ dsn , $ config );
72
72
73
73
// Select database
74
- $ this ->db = $ this ->connection ->selectDatabase ($ this ->database );
74
+ $ this ->db = $ this ->connection ->getDatabase ($ this ->database );
75
75
76
76
$ this ->tablePrefix = $ config ['prefix ' ] ?? '' ;
77
77
@@ -139,7 +139,7 @@ public function getMongoDB()
139
139
public function getDatabase (?string $ name = null ): Database
140
140
{
141
141
if ($ name && $ name !== $ this ->database ) {
142
- return $ this ->connection ->{ $ name} ;
142
+ return $ this ->connection ->getDatabase ( $ name) ;
143
143
}
144
144
145
145
return $ this ->db ;
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ private function registerFlysystemAdapter(): void
133
133
}
134
134
135
135
$ bucket = $ connection ->getClient ()
136
- ->selectDatabase ($ config ['database ' ] ?? $ connection ->getDatabaseName ())
136
+ ->getDatabase ($ config ['database ' ] ?? $ connection ->getDatabaseName ())
137
137
->selectGridFSBucket (['bucketName ' => $ config ['bucket ' ] ?? 'fs ' , 'disableMD5 ' => true ]);
138
138
}
139
139
You can’t perform that action at this time.
0 commit comments