From 68c087e85cb1678172478d67d106c239ccb2d878 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 14 May 2016 22:19:10 -0400 Subject: Update PicoDb --- app/ServiceProvider/DatabaseProvider.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'app/ServiceProvider/DatabaseProvider.php') 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; } -- cgit v1.2.3