DBPdo instead of DBMysqli

This commit is contained in:
xiaomlove
2026-04-13 03:12:04 +07:00
parent 9995767bf7
commit f271e28b15
7 changed files with 197 additions and 10 deletions
+3 -2
View File
@@ -622,10 +622,11 @@ function last_query($all = false, $format = 'json')
{
static $connection;
if (is_null($connection)) {
$connectionName = \Nexus\Database\NexusDB::getConnectionName();
if (IN_NEXUS) {
$connection = \Illuminate\Database\Capsule\Manager::connection(\Nexus\Database\NexusDB::ELOQUENT_CONNECTION_NAME);
$connection = \Illuminate\Database\Capsule\Manager::connection($connectionName);
} else {
$connection = \Illuminate\Support\Facades\DB::connection(config('database.default'));
$connection = \Illuminate\Support\Facades\DB::connection($connectionName);
}
}
if ($all === 'COUNT') {