mergeConfigFrom($this->path('config/bconnect.php'), 'bconnect'); $this->app->singleton(Connect::class, function ($app) { return new Connect($app); }); } public function boot() { $config_path = $this->path('config/bconnect.php'); $views_path = $this->path('resources/views/connect'); $this->publishes([ $config_path => config_path('bconnect.php'), $views_path => resource_path('views/vendor/connect'), ]); $this->loadTranslationsFrom($this->path('resources/translations'), 'connect'); $this->loadViewsFrom($this->path('resources/views/connect'), 'connect'); if ($this->app->runningInConsole()) { $this->commands([ RefreshTokens::class, Sync::class, ]); } // Laravel 7+ if (method_exists($this, 'loadViewComponentsAs')) { $this->loadViewComponentsAs('connect', [ \Bluesquare\Connect\View\Components\Button::class ]); } } // Misc private function path($path = '') { return __DIR__ . "/../$path"; } }