diff options
Diffstat (limited to 'app/ServiceProvider')
-rw-r--r-- | app/ServiceProvider/DatabaseProvider.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/ServiceProvider/DatabaseProvider.php b/app/ServiceProvider/DatabaseProvider.php index 26662b8a..c0dcd366 100644 --- a/app/ServiceProvider/DatabaseProvider.php +++ b/app/ServiceProvider/DatabaseProvider.php @@ -20,8 +20,13 @@ class DatabaseProvider implements ServiceProviderInterface public function register(Container $container) { $container['db'] = $this->getInstance(); - $container['db']->stopwatch = DEBUG; - $container['db']->logQueries = DEBUG; + + if (DEBUG) { + $container['db']->getStatementHandler() + ->withLogging() + ->withStopWatch() + ; + } return $container; } |