We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 046b92a commit 63b1794Copy full SHA for 63b1794
src/Connection.php
@@ -361,4 +361,9 @@ private static function lookupVersion(): string
361
return self::$version = 'error';
362
}
363
364
+
365
+ public function getDriverTitle()
366
+ {
367
+ return 'MongoDB';
368
+ }
369
src/Schema/Builder.php
@@ -5,6 +5,7 @@
5
namespace MongoDB\Laravel\Schema;
6
7
use Closure;
8
+use Illuminate\Database\Connection;
9
use MongoDB\Model\CollectionInfo;
10
use MongoDB\Model\IndexInfo;
11
@@ -289,4 +290,14 @@ protected function getAllCollections()
289
290
291
return $collections;
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
303
0 commit comments