mergeConfigFrom(__DIR__ . '/../../config/config.php', 'laravel-logs-layer'); $this->app->singleton(LogDataContainer::class, function ($app) { return new LogDataContainer(); }); LogCaptureObserver::registerListeners(); } /** * Bootstrap any application services. * * @return void */ public function boot() { if ($this->app->runningInConsole()) { $this->publishes([ __DIR__ . '/../../config/config.php' => config_path('laravel-logs-layer.php'), ], 'config'); } $this->app->when(AbstractLogService::class) ->needs(LogDataContainer::class) ->give(LogDataContainer::class); } }