app->register(BootstrapServiceProvider::class); } /** * Register package's namespaces. */ protected function registerNamespaces(): void { $configPath = __DIR__.'/../config/config.php'; $this->mergeConfigFrom($configPath, 'modules'); $this->publishes([ $configPath => config_path('modules.php'), ], 'config'); } /** * Register the service provider. */ abstract protected function registerServices(); /** * Get the services provided by the provider. * * @return array */ public function provides(): array { return [RepositoryInterface::class, 'modules']; } /** * Register providers. */ protected function registerProviders() { $this->app->register(ConsoleServiceProvider::class); $this->app->register(ContractsServiceProvider::class); } }