diff --git a/src/Integrations/Laravel/ClickhouseServiceProvider.php b/src/Integrations/Laravel/ClickhouseServiceProvider.php index dc1b714..6723777 100644 --- a/src/Integrations/Laravel/ClickhouseServiceProvider.php +++ b/src/Integrations/Laravel/ClickhouseServiceProvider.php @@ -16,7 +16,13 @@ public function boot() $db->extend('clickhouse', function ($config, $name) { $config['name'] = $name; - return new Connection($config); + $connection = new Connection($config); + + if ($this->app->bound('events')) { + $connection->setEventDispatcher($this->app['events']); + } + + return $connection; }); } }