Skip to content

Commit 798c2fa

Browse files
committed
显示当前查询的数据库
1 parent 443a2c9 commit 798c2fa

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/ServiceProvider.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ public function boot()
3535
$sqlWithPlaceholders = str_replace(['%', '?'], ['%%', '%s'], $query->sql);
3636

3737
$bindings = $query->connection->prepareBindings($query->bindings);
38-
$pdo = $query->connection->getPdo();
39-
$realSql = $sqlWithPlaceholders;
38+
$pdo = $query->connection->getPdo();
39+
$realSql = $sqlWithPlaceholders;
4040
$duration = $this->formatDuration($query->time / 1000);
4141

4242
if (count($bindings) > 0) {
@@ -63,11 +63,11 @@ public function register()
6363
private function formatDuration($seconds)
6464
{
6565
if ($seconds < 0.001) {
66-
return round($seconds * 1000000) . 'μs';
66+
return round($seconds * 1000000).'μs';
6767
} elseif ($seconds < 1) {
68-
return round($seconds * 1000, 2) . 'ms';
68+
return round($seconds * 1000, 2).'ms';
6969
}
7070

71-
return round($seconds, 2) . 's';
71+
return round($seconds, 2).'s';
7272
}
7373
}

0 commit comments

Comments
 (0)