diff --git a/src/QueryBuilder.php b/src/QueryBuilder.php index 946198a..0dbf6e9 100644 --- a/src/QueryBuilder.php +++ b/src/QueryBuilder.php @@ -74,6 +74,11 @@ public static function setGlobalConnection(Database $connection) self::$globalConnection = $connection; } + public static function getGlobalConnection(): ?Database + { + return self::$globalConnection ?? null; + } + /** * @param $collection *