mirror of
https://github.com/the-programmers-hangout/Hermes.git
synced 2026-09-04 01:06:00 +02:00
docker updates for web
This commit is contained in:
@@ -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);
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user