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)
7171 $ this ->database = $ this ->getDefaultDatabaseName ($ dsn , $ config );
7272
7373 // Select database
74- $ this ->db = $ this ->connection ->selectDatabase ($ this ->database );
74+ $ this ->db = $ this ->connection ->getDatabase ($ this ->database );
7575
7676 $ this ->tablePrefix = $ config ['prefix ' ] ?? '' ;
7777
@@ -139,7 +139,7 @@ public function getMongoDB()
139139 public function getDatabase (?string $ name = null ): Database
140140 {
141141 if ($ name && $ name !== $ this ->database ) {
142- return $ this ->connection ->{ $ name} ;
142+ return $ this ->connection ->getDatabase ( $ name) ;
143143 }
144144
145145 return $ this ->db ;
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ private function registerFlysystemAdapter(): void
133133 }
134134
135135 $ bucket = $ connection ->getClient ()
136- ->selectDatabase ($ config ['database ' ] ?? $ connection ->getDatabaseName ())
136+ ->getDatabase ($ config ['database ' ] ?? $ connection ->getDatabaseName ())
137137 ->selectGridFSBucket (['bucketName ' => $ config ['bucket ' ] ?? 'fs ' , 'disableMD5 ' => true ]);
138138 }
139139
You can’t perform that action at this time.
0 commit comments