Skip to content

Commit

Permalink
feat: autoconnect with .env
Browse files Browse the repository at this point in the history
  • Loading branch information
mychidarko committed Aug 17, 2024
1 parent 00eb11d commit 9269fda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Auth/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public static function dbConnection(\PDO $connection)
protected static function leafDbConnect()
{
if (!static::$db && function_exists('db')) {
if (db()->connection() instanceof \PDO) {
if (db()->connection() instanceof \PDO || db()->autoConnect()) {
static::$db = db();
}
}
Expand Down

0 comments on commit 9269fda

Please sign in to comment.