From 5bcce85282b12f64bc578822c00cce1e88288788 Mon Sep 17 00:00:00 2001 From: Alexander Diachenko Date: Tue, 24 Sep 2019 13:17:03 +0300 Subject: [PATCH] Pass Bowler exception handler dependencies via a service container --- src/BowlerServiceProvider.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/BowlerServiceProvider.php b/src/BowlerServiceProvider.php index f858a97..5453d85 100644 --- a/src/BowlerServiceProvider.php +++ b/src/BowlerServiceProvider.php @@ -50,6 +50,14 @@ public function register() return $app['vinelab.bowler.registrator']; }); + $this->app->bind(BowlerExceptionHandler::class, function ($app) { + return new BowlerExceptionHandler( + $app->make(ExceptionHandler::class), + $app->make('log'), + $app->make('config') + ); + }); + $this->app->bind(Connection::class, function () { // Bind connection to env configuration $rbmqHost = config('bowler.rabbitmq.host');