File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -361,4 +361,9 @@ private static function lookupVersion(): string
361
361
return self ::$ version = 'error ' ;
362
362
}
363
363
}
364
+
365
+ public function getDriverTitle ()
366
+ {
367
+ return 'MongoDB ' ;
368
+ }
364
369
}
Original file line number Diff line number Diff line change 5
5
namespace MongoDB \Laravel \Schema ;
6
6
7
7
use Closure ;
8
+ use Illuminate \Database \Connection ;
8
9
use MongoDB \Model \CollectionInfo ;
9
10
use MongoDB \Model \IndexInfo ;
10
11
@@ -289,4 +290,14 @@ protected function getAllCollections()
289
290
290
291
return $ collections ;
291
292
}
293
+
294
+ public function getConnectionCount ()
295
+ {
296
+ $ status = $ this ->connection
297
+ ->getMongoDB ()
298
+ ->command (['serverStatus ' => 1 ])
299
+ ->toArray ();
300
+
301
+ return $ status [0 ]['connections ' ]['current ' ];
302
+ }
292
303
}
You can’t perform that action at this time.
0 commit comments