docker updates for web

This commit is contained in:
itsAzaria
2026-02-20 13:28:07 +00:00
parent 16999ecea5
commit a628eea61f
6 changed files with 85 additions and 19 deletions
+8 -8
View File
@@ -16,14 +16,14 @@ class BotServiceProvider extends LaracordServiceProvider
parent::boot();
if (env('APP_ENV') === 'development') {
\DB::listen(function ($query) {
$sql = $query->sql;
$bindings = json_encode($query->bindings);
$time = $query->time;
$log = '['.date('Y-m-d H:i:s')."] SQL: $sql | Bindings: $bindings | Time: {$time}ms\n";
$logPath = storage_path('logs/query.log');
file_put_contents($logPath, $log, FILE_APPEND);
});
// \DB::listen(function ($query) {
// $sql = $query->sql;
// $bindings = json_encode($query->bindings);
// $time = $query->time;
// $log = '['.date('Y-m-d H:i:s')."] SQL: $sql | Bindings: $bindings | Time: {$time}ms\n";
// $logPath = storage_path('logs/query.log');
// file_put_contents($logPath, $log, FILE_APPEND);
// });
}
}